I have a error. The debugger says 0cx000000 or something like that access violation, which after reading online I found has to do with memory access violation or pointing t0 null memory location. Similar
, but not same codes, examples, seem to be working. I do not understand the problem with this one. Or I do not understand how to solve this one.
Precise Error:
Unhandled exception at 0x00000000 in myfile.exe: 0xC0000005: Access violation reading location 0x00000000 on.
Main File:
MSG Msg;
HWND hWnd;
static void doSth(FIX32 propert[])
{
UINT wdev;
myFunction(WTI_DEFCONTEXT, CTX_DEVICE, &wdev);
.
.
.
}
WndProc()
{
switch(Msg){
case WM_CREATE:
doSth(propert);
return 0;
}
WINAPI WinMain(...)
{
hWnd=Create...
return Msg.wParam;
}
Source Code:
Bool LoadD(void)
{
libr=LoadLibrary(...);
GetProcessAddress(libr,myFunction);
return TRUE;
}
void UnloadD(void)
{
FreeLibrary(libr);
myFunc=NULL;
}
I had linking problem. Solved it. But this pointer problem is giving me trouble. The debugger points to the two lines in the code.
myFunction(WTI_DEFCONTEXT, CTX_DEVICE, &wdev);
doSth(propert);
I know this is vague, with this little information. Specially there are a lot of header files involved too. But, is the problem/solution apparent from this code? The problem is null reference(??). What is solution?