Re: Using user32.dll in C++ mixed mode assembly

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Bovine Power <bovine@xxxxxxxxx> wrote in
news:Xns9765AC755CE99bovineman@xxxxxxxxxxxxx:

I am trying to use user32.dll with VS2005 in a mixed mode DLL
assembly. I am trying to access GetClientRect from within the
unmanaged code. I have included windows.h and set the Additional
Library Directories in the Linker to point to the directory with
user32.lib, but when I compile it I get the following error:

error LNK2019: unresolved external symbol _GetClientRect@8 referenced
in function "...

Is there anything else I need to do to access user32.dll?


Aha, I solved it. I needed to go into Linker, Input and add user32.lib to
the Additional Dependencies.
.



Relevant Pages

  • Using user32.dll in C++ mixed mode assembly
    ... I am trying to use user32.dll with VS2005 in a mixed mode DLL assembly. ... am trying to access GetClientRect from within the unmanaged code. ... included windows.h and set the Additional Library Directories in the Linker ...
    (microsoft.public.vsnet.ide)
  • Re: linker error - undefined functions
    ... funkctions like WSAStartup are undefined). ... linker> general> Additional Library Directories - but no success ...
    (microsoft.public.vstudio.general)
  • Re: Suppress Linking with Default System Libs?
    ... Is there any way to suppress the linker from looking at the default paths? ... Only search library directories explicitly specified on the ... (including linker scripts specified on the command line) ...
    (comp.os.linux.development.apps)
  • Re: linker error - undefined functions
    ... funkctions like WSAStartup are undefined). ... linker> general> Additional Library Directories - but no success ...
    (microsoft.public.vstudio.general)
  • Re: Suppress Linking with Default System Libs?
    ... Is there any way to suppress the linker from looking at the default paths? ... Only search library directories explicitly specified on the ... (including linker scripts specified on the command line) ...
    (comp.os.linux.development.apps)