Click here to Skip to main content
16,011,626 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDLL Language system troubles Pin
Kaworu27-Jun-05 20:58
Kaworu27-Jun-05 20:58 
GeneralInserting an icon on to a cell in Flexi Grid Pin
SharatJi7-Jun-05 20:58
SharatJi7-Jun-05 20:58 
Generaldevelop an assembler based on reqmts in VC++ Pin
emusing7-Jun-05 20:31
emusing7-Jun-05 20:31 
GeneralRe: develop an assembler based on reqmts in VC++ Pin
Bob Stanneveld7-Jun-05 20:38
Bob Stanneveld7-Jun-05 20:38 
GeneralRe: develop an assembler based on reqmts in VC++ Pin
toxcct7-Jun-05 20:42
toxcct7-Jun-05 20:42 
GeneralRe: develop an assembler based on reqmts in VC++ Pin
Stlan7-Jun-05 22:59
Stlan7-Jun-05 22:59 
GeneralRe: develop an assembler based on reqmts in VC++ Pin
ThatsAlok7-Jun-05 23:05
ThatsAlok7-Jun-05 23:05 
GeneralVB/C++ DLL calls Pin
Member 20276077-Jun-05 16:54
Member 20276077-Jun-05 16:54 
I spent tons of time trying to get this working, and it looks like I need someone' help.

I have three C++ functions in a DLL. One creates an object and returns pointer to this object. Second accepts the pointer of an object, and calls one of the object's member functions. Third deallocates memory. When #1 and #2 are in one function, everything works fine. When they are split, the application crashes.

Maybe there is something wrong with my setup? Is there a chance that memory gets deallocated in between somehow? Please help. Thank you.

Function #1
===========

long _stdcall InitClient( char* cErrStr )
{
CBLZQuoteManager* pQuoteManager = NULL;
CMyQuotesClient* pQuotesClient = NULL;

pQuoteManager = (CBLZQuoteManager *)(CBLZQuoteManager::GetInstance(RUNTIME_CLASS(CBLZQuoteManager)))

pQuotesClient = new CMyQuotesClient();
....
return ( long )pQuotesClient;
}

Function #2
===========

short _stdcall GetQuote( long lPtr,
double& dResult,
char* cErrStr )
{
CMyQuotesClient* pQuotesClient = ( CMyQuotesClient * ) lPtr;
pQuotesClient->DoSomething();
....
}

VB.NET side
===========

Public Declare Function InitClient Lib "quotes.dll" () As Long

Public Declare Function GetQuote Lib "quotes.dll" _
(ByVal lPtr As Long, ByRef dResult As Double, _
ByVal sError As String) As Short

......
lPtr = InitClient()
nReturn = GetQuote(lPtr, dResult, sError)
.....
Generaltemplates + overloading ofstream = AHH! Pin
FocusedWolf7-Jun-05 16:46
FocusedWolf7-Jun-05 16:46 
GeneralRe: templates + overloading ofstream = AHH! Pin
Christian Graus7-Jun-05 17:07
protectorChristian Graus7-Jun-05 17:07 
GeneralRe: templates + overloading ofstream = AHH! Pin
FocusedWolf7-Jun-05 17:21
FocusedWolf7-Jun-05 17:21 
GeneralRe: templates + overloading ofstream = AHH! Pin
Bob Stanneveld7-Jun-05 21:00
Bob Stanneveld7-Jun-05 21:00 
GeneralRe: templates + overloading ofstream = AHH! Pin
FocusedWolf8-Jun-05 3:59
FocusedWolf8-Jun-05 3:59 
GeneralRe: templates + overloading ofstream = AHH! Pin
Bob Stanneveld8-Jun-05 4:10
Bob Stanneveld8-Jun-05 4:10 
GeneralNeed to notify the parent dialog when in-place edit of CListCtrl takes place... Pin
Anonymous7-Jun-05 16:45
Anonymous7-Jun-05 16:45 
GeneralRe: Need to notify the parent dialog when in-place edit of CListCtrl takes place... Pin
Christian Graus7-Jun-05 17:18
protectorChristian Graus7-Jun-05 17:18 
GeneralRe: Need to notify the parent dialog when in-place edit of CListCtrl takes place... Pin
Anonymous7-Jun-05 19:17
Anonymous7-Jun-05 19:17 
GeneralNeeded some help in programming... Pin
Member 20247577-Jun-05 15:24
Member 20247577-Jun-05 15:24 
GeneralRe: Needed some help in programming... Pin
Christian Graus7-Jun-05 15:38
protectorChristian Graus7-Jun-05 15:38 
GeneralRe: Needed some help in programming... Pin
Member 20247577-Jun-05 15:47
Member 20247577-Jun-05 15:47 
GeneralRe: Needed some help in programming... Pin
Christian Graus7-Jun-05 15:49
protectorChristian Graus7-Jun-05 15:49 
GeneralCapture Video through DirectShow on WinCE Pin
gao20047-Jun-05 14:52
gao20047-Jun-05 14:52 
GeneralRe: Capture Video through DirectShow on WinCE Pin
FlyingTinman7-Jun-05 22:12
FlyingTinman7-Jun-05 22:12 
GeneralRe: Capture Video through DirectShow on WinCE Pin
gao20048-Jun-05 16:17
gao20048-Jun-05 16:17 
GeneralRe: Capture Video through DirectShow on WinCE Pin
gao20048-Jun-05 19:13
gao20048-Jun-05 19: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.