Click here to Skip to main content
15,906,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: print an MS-Access table Pin
Ankush Mehta27-Nov-05 23:38
Ankush Mehta27-Nov-05 23:38 
AnswerRe: print an MS-Access table Pin
S Douglas28-Nov-05 19:36
professionalS Douglas28-Nov-05 19:36 
AnswerRe: print an MS-Access table Pin
Ankush Mehta28-Nov-05 21:34
Ankush Mehta28-Nov-05 21:34 
GeneralRe: print an MS-Access table Pin
S Douglas28-Nov-05 21:59
professionalS Douglas28-Nov-05 21:59 
GeneralRe: print an MS-Access table Pin
Ankush Mehta28-Nov-05 22:51
Ankush Mehta28-Nov-05 22:51 
GeneralRe: print an MS-Access table Pin
S Douglas28-Nov-05 23:45
professionalS Douglas28-Nov-05 23:45 
QuestionProblem in getting TooTip from ToolBar Pin
rajan.msmy27-Nov-05 18:49
rajan.msmy27-Nov-05 18:49 
QuestionGetProcAddress Problems :( Pin
Bobamagoo27-Nov-05 18:01
Bobamagoo27-Nov-05 18:01 
I've been tossing this one around for days and can't figure it out. I'm trying to dynamically load DLLs using the LoadLibrary/GetProcAddress method. I know I've loaded the library, but I can't get GetProcAddress to find the function. Here's the code.

<br />
// From the header<br />
private:<br />
    typedef Object __gc * (__cdecl *Builder)();<br />
    Builder build;<br />
    HINSTANCE library;<br />
    FARPROC holder;<br />
    Object * wompi;<br />
<br />
// From the cpp<br />
DLLoader::DLLoader()<br />
{<br />
    library = LoadLibrary(_T("LeetTrans"));<br />
    if(library != NULL)<br />
    {<br />
        /*<br />
        GetProcAddress won't assign the function to variable holder.<br />
        I don't understand why.<br />
        */<br />
        holder = GetProcAddress(library,_T("Build"));<br />
        if (holder != NULL)<br />
        {<br />
           build = (Object __gc*(*)()) holder;<br />
           wompi = build();<br />
        }<br />
    }<br />
}<br />
<br />
// From LeetTrans.cpp in the DLL<br />
Object __gc * __cdecl Build()<br />
{<br />
    LeetTrans * a = new LeetTrans();<br />
    return a;<br />
}<br />
<br />
// From LeetTrans.h in the DLL<br />
Object __gc * __cdecl Build();<br />


And finally, here's the stuff from the .DEF file in the DLL. I don't even know if I need this:

LIBRARY "LeetTrans"
EXPORTS
Build @1

I don't know what else to do. Anyone can even lead me in the right direction? Thank you in advance for any help.
AnswerRe: GetProcAddress Problems :( Pin
sunit527-Nov-05 18:55
sunit527-Nov-05 18:55 
GeneralRe: GetProcAddress Problems :( Pin
Bobamagoo27-Nov-05 19:28
Bobamagoo27-Nov-05 19:28 
AnswerRe: GetProcAddress Problems :( Pin
Gavin Taylor27-Nov-05 19:05
professionalGavin Taylor27-Nov-05 19:05 
GeneralRe: GetProcAddress Problems :( Pin
Bobamagoo27-Nov-05 19:25
Bobamagoo27-Nov-05 19:25 
GeneralRe: GetProcAddress Problems :( Pin
Gavin Taylor27-Nov-05 20:26
professionalGavin Taylor27-Nov-05 20:26 
QuestionLog off Window Pin
trunghd27-Nov-05 16:55
trunghd27-Nov-05 16:55 
AnswerRe: Log off Window Pin
Cool Ju27-Nov-05 17:14
Cool Ju27-Nov-05 17:14 
GeneralRe: Log off Window Pin
trunghd28-Nov-05 17:01
trunghd28-Nov-05 17:01 
QuestionISO DVD / CD Burning Libraries Pin
raddog27-Nov-05 16:36
raddog27-Nov-05 16:36 
AnswerRe: ISO DVD / CD Burning Libraries Pin
Saksida Bojan27-Nov-05 19:10
Saksida Bojan27-Nov-05 19:10 
QuestionHow to avoid word wrap in MFC Pin
lkeller27-Nov-05 15:32
lkeller27-Nov-05 15:32 
AnswerRe: How to avoid word wrap in MFC Pin
raddog27-Nov-05 16:51
raddog27-Nov-05 16:51 
Questioncompiling error when use type_info::operator== Pin
followait27-Nov-05 14:57
followait27-Nov-05 14:57 
AnswerRe: compiling error when use type_info::operator== Pin
PJ Arends27-Nov-05 15:27
professionalPJ Arends27-Nov-05 15:27 
GeneralRe: compiling error when use type_info::operator== Pin
followait28-Nov-05 3:28
followait28-Nov-05 3:28 
QuestionIntelligent bitmap depth conversion 1,4,8,16,24 bits Pin
Sumit Kapoor27-Nov-05 14:52
Sumit Kapoor27-Nov-05 14:52 
AnswerRe: Intelligent bitmap depth conversion 1,4,8,16,24 bits Pin
John R. Shaw27-Nov-05 18:13
John R. Shaw27-Nov-05 18:13 

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.