vikram deshmukh
May 12th, 1999, 10:36 PM
Hi Gurus ,
Thanks for replies on my CString post . I've successfully dealt with
that problem by u'r help .
I've copied the path into a character string called PathName which is
pointer to string . This PathName is nothing but a path to a bitmap
file .
I want to use this path in the view class's .CPP file .
Compilation & Linking is ok . It gives run-time error immediately when
application is executed .
Some of the key statements in this ->
// Global declaration in Type.cpp
char *PathName;
.
.
.
// definition in Type.cpp - function handler OnOk()
PathName = (char*)malloc(100);
// declaration in Sview.cpp
extern char *PathName;
// Usage in SView.cpp
strcpy(pFile,PathName);
// error at strcat.asm
mov eax,dword ptr [ecx] ; read 4 bytes
// usage of strcat in Type.cpp
strcpy(PathName,"C:\\abc\\def\\");
strcat(PathName,FileName); // FileName is char* taken by user
/* even MessageBox after this was showing correct path in the
PathName in previous version of program */
Thanks in advance !
Thanks for replies on my CString post . I've successfully dealt with
that problem by u'r help .
I've copied the path into a character string called PathName which is
pointer to string . This PathName is nothing but a path to a bitmap
file .
I want to use this path in the view class's .CPP file .
Compilation & Linking is ok . It gives run-time error immediately when
application is executed .
Some of the key statements in this ->
// Global declaration in Type.cpp
char *PathName;
.
.
.
// definition in Type.cpp - function handler OnOk()
PathName = (char*)malloc(100);
// declaration in Sview.cpp
extern char *PathName;
// Usage in SView.cpp
strcpy(pFile,PathName);
// error at strcat.asm
mov eax,dword ptr [ecx] ; read 4 bytes
// usage of strcat in Type.cpp
strcpy(PathName,"C:\\abc\\def\\");
strcat(PathName,FileName); // FileName is char* taken by user
/* even MessageBox after this was showing correct path in the
PathName in previous version of program */
Thanks in advance !