How to static link SystemFunction036 of Advapi32.dll in Visual C++ 2010 Express?

  • Thread starter Thread starter forever a loser
  • Start date Start date
F

forever a loser

Guest
I know this is possible, because in masm32 when I write the code

includelib \masm32\lib\advapi32.lib
SystemFunction036 proto stdcall :PTR BYTE, :DWORD

Then

invoke SystemFunction036, offset buffer, sizeof buffer

works properly in a code where the words "LoadLibrary" and "GetProcAddress" don't appear at all.

But when in Visual C++ 2010 Express I write the code:

#pragma comment (lib,"advapi32.lib")
BOOLEAN SystemFunction036(PVOID,ULONG);

The program isn't executed when there exists at least one line of code that invokes SystemFunction036.

Why?

The compiler doesn't error me that "advapi32.lib" cannot be opened.

Continue reading...
 
Back
Top