Click here to Skip to main content
15,925,181 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Waiting for an application to finish Pin
Navin16-Dec-02 10:35
Navin16-Dec-02 10:35 
GeneralRe: Waiting for an application to finish Pin
Michael Dunn16-Dec-02 9:52
sitebuilderMichael Dunn16-Dec-02 9:52 
GeneralRe: Waiting for an application to finish Pin
Navin16-Dec-02 9:55
Navin16-Dec-02 9:55 
GeneralRe: Waiting for an application to finish Pin
Atlantys16-Dec-02 10:06
Atlantys16-Dec-02 10:06 
GeneralRe: Waiting for an application to finish Pin
Navin16-Dec-02 10:11
Navin16-Dec-02 10:11 
GeneralRe: Waiting for an application to finish Pin
Atlantys16-Dec-02 11:09
Atlantys16-Dec-02 11:09 
GeneralRe: Waiting for an application to finish Pin
Todd Smith16-Dec-02 18:59
Todd Smith16-Dec-02 18:59 
GeneralDll Help...... Pin
keb16-Dec-02 9:20
keb16-Dec-02 9:20 
I need a help in DLL area. My co-worker is passing me a Carray data type into my dll and that seem to cause a "access violation error" in his exe when he tries to delete that Carray value. When I look into his program, it seem to failing at FreeLibrary call. It was detecting an memory error there. So, I made up a sample program to talk to the dll and it was fine. He is using sometype of Active X component and I am not sure if that may have something to do with it but I was going to see if any of you guys had a problem with passing MFC datatype into Dll. I tried it through MFC extention dll and regular Dll and both failed in same way. Any information would help me. Thanks!


My DLL side:

extern "C" __declspec(dllexport)
int InitProcess(LPSTR lpPortName, HWND hWnd, CArray<cmdarray,cmdarray &=""> *pMsg)
{
pMsg->ADD(type);
return 1;
}

Co-worker's Main side:

CArray <cmdarray,cmdarray> *m_pCmdArray;
m_pCmdArray = new CArray <cmdarray,cmdarray &="">();
typedef int (* LPFNINITPROCESS)(LPCSTR,HWND, CArray <cmdarray,cmdarray &=""> *);
LPFNINITEPROCESS lpfnInit;
lpfnInit lpfnInitProcess;
hLib = LoadLibrary("MYDLL.dll");
lpfnInitProcess((LPCSTR)COMPORT, this->m_hWnd, m_pCmdArray);
FreeLibrary(hLib); <------------------ memory leak detect;
delete m_pCmdArray; <------------------ access viloation error... yack..
GeneralRe: Dll Help...... Pin
Rickard Andersson2016-Dec-02 9:26
Rickard Andersson2016-Dec-02 9:26 
GeneralRe: Dll Help...... Pin
Alvaro Mendez16-Dec-02 9:29
Alvaro Mendez16-Dec-02 9:29 
GeneralRe: Dll Help...... Pin
keb16-Dec-02 10:04
keb16-Dec-02 10:04 
GeneralRe: Dll Help...... Pin
Alvaro Mendez16-Dec-02 10:25
Alvaro Mendez16-Dec-02 10:25 
GeneralRecent File List Pin
will138316-Dec-02 8:28
will138316-Dec-02 8:28 
GeneralRe: Recent File List Pin
Gary Kirkham16-Dec-02 8:44
Gary Kirkham16-Dec-02 8:44 
GeneralRe: Recent File List Pin
will138316-Dec-02 8:56
will138316-Dec-02 8:56 
GeneralRe: Recent File List Pin
Gary Kirkham16-Dec-02 9:05
Gary Kirkham16-Dec-02 9:05 
GeneralRe: Recent File List Pin
will138316-Dec-02 9:17
will138316-Dec-02 9:17 
GeneralList Control Problem Pin
sikrip16-Dec-02 7:26
sikrip16-Dec-02 7:26 
GeneralRe: List Control Problem Pin
valikac16-Dec-02 8:04
valikac16-Dec-02 8:04 
Generalread/write datas from TCP/IP Pin
youssef16-Dec-02 7:23
youssef16-Dec-02 7:23 
GeneralRe: read/write datas from TCP/IP Pin
User 665816-Dec-02 7:37
User 665816-Dec-02 7:37 
GeneralRe: read/write datas from TCP/IP Pin
Jörgen Sigvardsson16-Dec-02 11:40
Jörgen Sigvardsson16-Dec-02 11:40 
GeneralOwner-drawn menus Pin
RobinBobin16-Dec-02 6:31
RobinBobin16-Dec-02 6:31 
GeneralRe: Owner-drawn menus Pin
Alvaro Mendez16-Dec-02 7:13
Alvaro Mendez16-Dec-02 7:13 
GeneralBuild Question.. Quickie... Pin
Ryan B.16-Dec-02 5:46
Ryan B.16-Dec-02 5:46 

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.