generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: bad pointer error in program

Previous Thread :: Next Thread 
julienmauriemort is not online. julienmauriemort
Joined: 09 May 2009
Total Posts: 21560
02 Jun 2013 12:12 AM
For some odd reason when I try to call a function in a DLL, I get some dumb buffer overrun and internal corruption thing. I set a breakpoint on when the function is called in the DLL from the main program. I've been trying to figure out why the pointer is becoming invalid.

This is the piece of line that calls:
((int (__stdcall *)(HINSTANCE, HINSTANCE, LPCWSTR, int))ent)(hIns, hPre, (LPCWSTR)lpCom, show)

And this is the function being called (in the external DLL):
signed int __stdcall LauncherMain(HINSTANCE hIns, HINSTANCE hPrev, LPCWSTR lpcom, int show)

But the pointer shows up as invalid (points to 0 or 0x706f746b)

Any reason why?
Report Abuse
julienmauriemort is not online. julienmauriemort
Joined: 09 May 2009
Total Posts: 21560
02 Jun 2013 12:32 AM
Hmmmm, now the function pointer is null when I checked again.
Report Abuse
julienmauriemort is not online. julienmauriemort
Joined: 09 May 2009
Total Posts: 21560
02 Jun 2013 12:36 AM
Apparently GetProcAddress(lib, "LauncherMain") returns null??
Report Abuse
julienmauriemort is not online. julienmauriemort
Joined: 09 May 2009
Total Posts: 21560
02 Jun 2013 12:50 AM
Ok, I got the GetProcAddress issue fixed, but the lpCmd parameter (taken from the 3 argument in WinMain) is still a bad pointer.
Report Abuse
julienmauriemort is not online. julienmauriemort
Joined: 09 May 2009
Total Posts: 21560
02 Jun 2013 01:14 AM
So I fixed the error in the argument call, but now it gives the overrun error at the very end of the program right before it exits.
Report Abuse
itunes89 is not online. itunes89
Joined: 19 Jan 2011
Total Posts: 1957
02 Jun 2013 03:50 AM
Nice conversation with yourself...
Report Abuse
Salvatorem is not online. Salvatorem
Joined: 26 May 2013
Total Posts: 83
02 Jun 2013 03:52 AM
I like pointers, they're useful.
Report Abuse
julienmauriemort is not online. julienmauriemort
Joined: 09 May 2009
Total Posts: 21560
02 Jun 2013 10:25 AM
Okay, but can anyone help with the overrun error upon exit? I set a break point on the very last line, and the only thing left on the stack is 0 (the result value) for the return value. But when it exits, it gives me the overrun error.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image