Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Could not find function 'Function Name' in Dbprocore.dll.

Author
Message
DB PROgrammer
12
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 7th Mar 2009 06:43 Edited at: 7th Mar 2009 07:03
That's the error i'm getting when trying to use my simple dll in Dbpro. Since this is a test dll most of the code is copied from these forums.

DllMain.cpp


RSFile.rc


Head.h


Compiled dll attached.

The header file Head.h was a last second try to get it working so it may not be needed. Please take the time to reply, thanks!

Edit:

Lol, 5 minutes after I finaly post I figure it out. my problem was that I didn't completely copy the function name from the dll for the resource file. For referance when you go to copy the function name from the dll copy everything surrounding the name on both sides until you reach a space.


DBPro, limited by the programmer.

Attachments

Login to view attachments
DB PROgrammer
12
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 7th Mar 2009 07:57
Ok, so now I'm trying to do what I've been trying to do the whole time.

dllmain.cpp


Head.h


This function crashes my program when I call it. Any ideas about what could be causing it?


DBPro, limited by the programmer.
IanM
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Mar 2009 16:35
Your 'populate the new string' is incorrect. Your sprintf should have %s in the string, but I'd suggest you simply replace the line with strcpy.

Your earlier sprintf is also incorrect in pretty much the same way.

DB PROgrammer
12
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 8th Mar 2009 01:37
That didn't seem to fix my problem. Here's the new cpp file.

dllmain.cpp



DBPro, limited by the programmer.
DB PROgrammer
12
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 8th Mar 2009 02:19
Hmm... for some reason the edit post is acting wierd. I figured out that the problem is with strcat I just don't know how to fix it. Any ideas?


DBPro, limited by the programmer.
IanM
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Mar 2009 19:55
Where are you allocating the storage for this variable?

LPSTR filter;

Also, you can't append an extra null byte to a char* with strcat - you'll need to build that kind of string manually.

Login to post a reply

Server time is: 2019-07-18 23:57:54
Your offset time is: 2019-07-18 23:57:54