Click here to Skip to main content
15,892,805 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what is the difference? Pin
Gary R. Wheeler3-Sep-05 4:18
Gary R. Wheeler3-Sep-05 4:18 
QuestionStrange Acclerator Table Problem Pin
megafont1-Sep-05 19:42
megafont1-Sep-05 19:42 
NewsRe: Strange Acclerator Table Problem Pin
megafont2-Sep-05 18:26
megafont2-Sep-05 18:26 
QuestionGetting Internet Information Pin
rajeevktripathi1-Sep-05 19:21
rajeevktripathi1-Sep-05 19:21 
QuestionCan I use Visual C++ *.lib into C#? Pin
uumeme1-Sep-05 18:55
uumeme1-Sep-05 18:55 
AnswerRe: Can I use Visual C++ *.lib into C#? Pin
Christian Graus1-Sep-05 18:59
protectorChristian Graus1-Sep-05 18:59 
AnswerRe: Can I use Visual C++ *.lib into C#? Pin
Bob Stanneveld1-Sep-05 19:24
Bob Stanneveld1-Sep-05 19:24 
QuestionAfter Reboot PC, follow the un-completed job? Pin
Steve Chang1-Sep-05 17:57
Steve Chang1-Sep-05 17:57 
AnswerRe: After Reboot PC, follow the un-completed job? Pin
Christian Graus1-Sep-05 18:15
protectorChristian Graus1-Sep-05 18:15 
AnswerRe: After Reboot PC, follow the un-completed job? Pin
Eytukan1-Sep-05 22:52
Eytukan1-Sep-05 22:52 
QuestionExample of server and client programming Pin
Member 21610041-Sep-05 17:17
Member 21610041-Sep-05 17:17 
AnswerRe: Example of server and client programming Pin
Eytukan1-Sep-05 23:30
Eytukan1-Sep-05 23:30 
AnswerRe: Example of server and client programming Pin
ThatsAlok2-Sep-05 0:01
ThatsAlok2-Sep-05 0:01 
QuestionHw to Shut down certain pc automatically whn the priority show emergency Pin
bryan5231-Sep-05 16:47
bryan5231-Sep-05 16:47 
QuestionRe: Hw to Shut down certain pc automatically whn the priority show emergency Pin
Jose Lamas Rios1-Sep-05 16:54
Jose Lamas Rios1-Sep-05 16:54 
QuestionRe: Hw to Shut down certain pc automatically whn the priority show emergency Pin
bryan5231-Sep-05 17:24
bryan5231-Sep-05 17:24 
QuestionDll Not Working Correctly Pin
dmtwpi211-Sep-05 16:17
dmtwpi211-Sep-05 16:17 
I'm trying to call the SystemParametersInfo() function in User32.dll from my C/C++ code on Win2k but it's not working. I've used the same code to successfully call a function from a different dll (kernel32.dll) so I'm confused. The LoadLibrary command works, but the GetProcAddress command is not, thus I get the output:

started it up...
loaded library...trying to find address of function...
proc addr: 0
couldn't get proc addr

I'm compiling with Visual Studio.net 2003. Any suggestions would be greatly appreciated. Thanks.


<br />
<br />
/* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/systemparametersinfo.asp */<br />
<br />
#include <stdio.h><br />
#include <windows.h><br />
<br />
#define _WIN32_WINNT 0x0500<br />
<br />
typedef BOOL (*MYPROC) (UINT, UINT, PVOID, UINT);<br />
HINSTANCE hinstLib; <br />
MYPROC ProcAdd; <br />
<br />
BOOL result;   // return value of a call<br />
UINT uiAction; // the 4 params for function<br />
UINT uiParam;  // the 4 params for function<br />
PVOID pvParam; // the 4 params for function<br />
UINT fWinIni;  // the 4 params for function<br />
<br />
int main()<br />
{<br />
  printf("started it up...\n");<br />
  hinstLib = LoadLibrary("User32.dll");<br />
<br />
  if (hinstLib != NULL) <br />
  { <br />
    printf("loaded library...trying to find address of function...\n");<br />
    ProcAdd = (MYPROC) GetProcAddress(hinstLib, "SystemParametersInfo"); <br />
    printf("proc addr: %d\n", ProcAdd);<br />
    if (!ProcAdd) <br />
    {<br />
      printf("couldn't get proc addr\n");<br />
      FreeLibrary(hinstLib);<br />
      return 1;<br />
    }<br />
    printf("got proc addr...calling function\n");<br />
    result = (ProcAdd) (uiAction, uiParam, pvParam, fWinIni);  <br />
  } <br />
  else <br />
  {<br />
    printf("Failed to load lib\n");<br />
  }<br />
	<br />
  FreeLibrary(hinstLib);<br />
  printf("freed lib\n");<br />
  return 0;<br />
}<br />

AnswerRe: Dll Not Working Correctly Pin
Jose Lamas Rios1-Sep-05 16:37
Jose Lamas Rios1-Sep-05 16:37 
GeneralRe: Dll Not Working Correctly Pin
Anonymous2-Sep-05 1:50
Anonymous2-Sep-05 1:50 
GeneralRe: Dll Not Working Correctly Pin
Jose Lamas Rios2-Sep-05 3:37
Jose Lamas Rios2-Sep-05 3:37 
Questionhow to define a const multileline string Pin
xiaohe5211-Sep-05 15:39
xiaohe5211-Sep-05 15:39 
AnswerRe: how to define a const multileline string Pin
followait1-Sep-05 15:42
followait1-Sep-05 15:42 
GeneralRe: how to define a const multileline string Pin
xiaohe5211-Sep-05 15:45
xiaohe5211-Sep-05 15:45 
GeneralRe: how to define a const multileline string Pin
Christian Graus1-Sep-05 15:55
protectorChristian Graus1-Sep-05 15:55 
GeneralRe: how to define a const multileline string Pin
Trollslayer1-Sep-05 21:58
mentorTrollslayer1-Sep-05 21:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.