Click here to Skip to main content
15,911,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPosting data to web Pin
Rahim Rattani6-Nov-04 19:10
Rahim Rattani6-Nov-04 19:10 
GeneralRe: Posting data to web Pin
ThatsAlok6-Nov-04 19:41
ThatsAlok6-Nov-04 19:41 
GeneralRe: Posting data to web Pin
Rahim Rattani7-Nov-04 1:51
Rahim Rattani7-Nov-04 1:51 
GeneralRe: Posting data to web Pin
ThatsAlok7-Nov-04 2:38
ThatsAlok7-Nov-04 2:38 
GeneralRe: Search engine Pin
ThatsAlok6-Nov-04 17:53
ThatsAlok6-Nov-04 17:53 
GeneralRe: Search engine Pin
ThatsAlok7-Nov-04 0:03
ThatsAlok7-Nov-04 0:03 
GeneralSimple app to call dll Pin
mjeb11116-Nov-04 16:24
mjeb11116-Nov-04 16:24 
GeneralRe: Simple app to call dll Pin
ThatsAlok6-Nov-04 17:49
ThatsAlok6-Nov-04 17:49 
Hi Buddy,
you can call that DLL Function By two Ways
#1 Via using LoadLibrary %GetProcAddress Func
#2 including the headr file and Libaray file in your project and directly calling function.

UnderStandSmile | :) ,i Don't think so.
here is example for both using your's iPong.dll

#1 Using LoadLibaray

Declare Function in your calling Client
typedef BOOL (WINAPI *MYOPENFILENAME)(HWND, LPTSTR, LPTSTR);<br />
<br />
typedef BOOL (WINAPI *MYGETSAVEFILENAME)(HWND, LPTSTR, LPTSTR);


Now use LoadLibrary function to Dynamic Load Libaray

MYOPENFILENAME myFunc1;<br />
<br />
    HMODULE hPong=::LoadLibrary("ipong.dll");<br />
<br />
if(hPong)<br />
{<br />
//dynamic load the function<br />
   myFunc1=(MYOPENFILENAME)::GetProcAddress(hPong,"MyGetOpenFileName");<br />
<br />
        if(myFunc1)<br />
         {<br />
         //call the function<br />
         (myFunc1)();<br />
<br />
         }<br />
<br />
}


i think our method is little tough for Beginner you can try second method it's little easy.

#2 modify the code of IPong add a header file Ipong.h
and add these two function to it

BOOL __stdcall MyGetOpenFileName(HWND, LPTSTR, LPTSTR);<br />
BOOL __stdcall MyGetSaveFileName(HWND, LPTSTR, LPTSTR);


and add this header file to ipong.cpp

#include "stdafx.h"
#include "resource.h"
#include "ipong.h"

now recompile and again make dll.

now copy ipong.h,ipong.lib into you calling client Sourec code and use them as simple function.




-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
GeneralRe: Simple app to call dll Pin
mjeb11117-Nov-04 10:59
mjeb11117-Nov-04 10:59 
GeneralRe: Simple app to call dll Pin
ThatsAlok7-Nov-04 18:12
ThatsAlok7-Nov-04 18:12 
GeneralRe: Simple app to call dll Pin
mjeb11117-Nov-04 18:33
mjeb11117-Nov-04 18:33 
GeneralRe: Simple app to call dll Pin
ThatsAlok7-Nov-04 21:58
ThatsAlok7-Nov-04 21:58 
GeneralRe: Simple app to call dll Pin
ThatsAlok7-Nov-04 21:58
ThatsAlok7-Nov-04 21:58 
GeneralRe: Simple app to call dll Pin
mjeb11117-Nov-04 22:32
mjeb11117-Nov-04 22:32 
GeneralRe: Simple app to call dll Pin
jan larsen9-Nov-04 0:48
jan larsen9-Nov-04 0:48 
GeneralRe: Simple app to call dll Pin
mjeb11119-Nov-04 6:52
mjeb11119-Nov-04 6:52 
GeneralFont height in pixel Pin
Vancouver6-Nov-04 11:43
Vancouver6-Nov-04 11:43 
GeneralRe: Font height in pixel Pin
Michael Dunn6-Nov-04 15:00
sitebuilderMichael Dunn6-Nov-04 15:00 
GeneralRe: Font height in pixel Pin
Vancouver6-Nov-04 20:53
Vancouver6-Nov-04 20:53 
QuestionHow to print out a character Pin
Cuu6-Nov-04 10:38
Cuu6-Nov-04 10:38 
AnswerRe: How to print out a character Pin
faroqtam6-Nov-04 12:36
faroqtam6-Nov-04 12:36 
GeneralRe: How to print out a character Pin
Cuu8-Nov-04 15:15
Cuu8-Nov-04 15:15 
AnswerRe: How to print out a character Pin
ThatsAlok6-Nov-04 17:28
ThatsAlok6-Nov-04 17:28 
GeneralRe: How to print out a character Pin
Cuu8-Nov-04 15:16
Cuu8-Nov-04 15:16 
GeneralRe: How to print out a character Pin
ThatsAlok8-Nov-04 18:24
ThatsAlok8-Nov-04 18:24 

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.