Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. NetJoinDomain-lm.h, lmjoin.h

NetJoinDomain-lm.h, lmjoin.h

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiohelpquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    daavena
    wrote on last edited by
    #1

    Hi all, I want to use NetJoinDomain function. It always ends by errors(89) in Lmjoin.h or Lm.h. I have linked netapi32.dll. Here is one of 89 errors: Error 1 error C2146: syntax error : missing ';' before identifier 'NET_API_FUNCTION' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmjoin.h 99 What am I doing wrong? Thanks.

    J 1 Reply Last reply
    0
    • D daavena

      Hi all, I want to use NetJoinDomain function. It always ends by errors(89) in Lmjoin.h or Lm.h. I have linked netapi32.dll. Here is one of 89 errors: Error 1 error C2146: syntax error : missing ';' before identifier 'NET_API_FUNCTION' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmjoin.h 99 What am I doing wrong? Thanks.

      J Offline
      J Offline
      Jijo Raj
      wrote on last edited by
      #2

      I think you've just included Lmjoin.h. It needs Lm.h also. Just include both as follows.

      #include "Lm.h"
      #include "lmjoin.h"

      Me too had the same error by just including Lmjoin.h. :rolleyes: Regards, Jijo.

      _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

      D 1 Reply Last reply
      0
      • J Jijo Raj

        I think you've just included Lmjoin.h. It needs Lm.h also. Just include both as follows.

        #include "Lm.h"
        #include "lmjoin.h"

        Me too had the same error by just including Lmjoin.h. :rolleyes: Regards, Jijo.

        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

        D Offline
        D Offline
        daavena
        wrote on last edited by
        #3

        Thank for your reply but it's same Error 1 error C2143: syntax error : missing ';' before '__stdcall' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmaccess.h 46 Regards, Daavena

        B J D 3 Replies Last reply
        0
        • D daavena

          Thank for your reply but it's same Error 1 error C2143: syntax error : missing ';' before '__stdcall' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmaccess.h 46 Regards, Daavena

          B Offline
          B Offline
          bob16972
          wrote on last edited by
          #4

          daavena wrote:

          but it's same

          Not quite. If you'll notice the errors are different. Error 1 error C2146: syntax error : missing ';' before identifier 'NET_API_FUNCTION' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmjoin.h 99 Error 1 error C2143: syntax error : missing ';' before '__stdcall' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmaccess.h 46 it's now complaining about something in lmaccess.h so you've likely included the headers too high up in your stdafx.h file. Make sure the includes are toward the bottom of the Wizard generated Include statements in stdafx.h to make sure the whole mess of other junk is in place before it attempts to include your api headers. Do a "rebuild all" to ensure everything gets taken into consideration. // All wizard generated stuff should be above this #include "Lm.h" #include "Lmjoin.h" #pragma comment(lib, "Netapi32")

          1 Reply Last reply
          0
          • D daavena

            Thank for your reply but it's same Error 1 error C2143: syntax error : missing ';' before '__stdcall' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmaccess.h 46 Regards, Daavena

            J Offline
            J Offline
            Jijo Raj
            wrote on last edited by
            #5

            Could you paste your code snippet? the header include section and the relevant code section. Regards, Jijo.

            _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

            1 Reply Last reply
            0
            • D daavena

              Thank for your reply but it's same Error 1 error C2143: syntax error : missing ';' before '__stdcall' c:\program files\microsoft visual studio 8\vc\platformsdk\include\lmaccess.h 46 Regards, Daavena

              D Offline
              D Offline
              daavena
              wrote on last edited by
              #6

              Thaks all for your help. I am so stupid. I forgot include "windows.h" after that it is working. Thanks. Regards, Daavena.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups