Click here to Skip to main content
15,914,642 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Value of dmPaperSize in DEVMODE structure for custom papersize Pin
vcpgmr4-Feb-07 17:31
vcpgmr4-Feb-07 17:31 
AnswerRe: Value of dmPaperSize in DEVMODE structure for custom papersize Pin
Hamid_RT2-Feb-07 5:52
Hamid_RT2-Feb-07 5:52 
Questionhow to write and read into files using vc++ Pin
prem.makal1-Feb-07 18:46
prem.makal1-Feb-07 18:46 
AnswerRe: how to write and read into files using vc++ Pin
Hans Dietrich18-Feb-07 0:19
mentorHans Dietrich18-Feb-07 0:19 
QuestionError in using Unicod DLL in non unicode Application Pin
Atul231-Feb-07 18:18
Atul231-Feb-07 18:18 
AnswerRe: Error in using Unicod DLL in non unicode Application Pin
Naveen1-Feb-07 19:08
Naveen1-Feb-07 19:08 
GeneralRe: Error in using Unicod DLL in non unicode Application Pin
Atul231-Feb-07 19:33
Atul231-Feb-07 19:33 
GeneralRe: Error in using Unicod DLL in non unicode Application [modified] Pin
Naveen1-Feb-07 19:44
Naveen1-Feb-07 19:44 
M. Atul wrote:
I am not using two DLL

Big Grin | :-D



M. Atul wrote:
and return CString values


here is the pblm. CString internally keeps a pointer of type LPTSTR.

in a unciode define dll it becomes LPTSTR = whcar_t*

in a non unciode application it become LPTSTR - char*

In your case a wchar_t pointer is interpreted as char* pointer after u have got the retun value from the function.

solution:
Change the return type from CString to wchar_t*.

// in dll
wchar_t* fun( DWORD dw )
{
return somepointer;
}
// in client application
CString cs = fun( 2 );





-- modified at 1:49 Friday 2nd February, 2007

nave

GeneralRe: Error in using Unicod DLL in non unicode Application Pin
Atul231-Feb-07 23:35
Atul231-Feb-07 23:35 
GeneralRe: Error in using Unicod DLL in non unicode Application Pin
Naveen2-Feb-07 0:38
Naveen2-Feb-07 0:38 
GeneralRe: Error in using Unicod DLL in non unicode Application Pin
Atul232-Feb-07 1:03
Atul232-Feb-07 1:03 
GeneralRe: Error in using Unicod DLL in non unicode Application Pin
Naveen2-Feb-07 1:08
Naveen2-Feb-07 1:08 
QuestionPrint using custom form in windowsxp (C++ app) Pin
vcpgmr1-Feb-07 17:23
vcpgmr1-Feb-07 17:23 
AnswerRe: Print using custom form in windowsxp (C++ app) Pin
Hamid_RT2-Feb-07 5:44
Hamid_RT2-Feb-07 5:44 
GeneralRe: Print using custom form in windowsxp (C++ app) Pin
vcpgmr4-Feb-07 17:27
vcpgmr4-Feb-07 17:27 
GeneralRe: Print using custom form in windowsxp (C++ app) Pin
Hamid_RT4-Feb-07 18:20
Hamid_RT4-Feb-07 18:20 
GeneralRe: Print using custom form in windowsxp (C++ app) Pin
Hamid_RT14-Feb-07 6:34
Hamid_RT14-Feb-07 6:34 
QuestionAdd tooltips to resource like bitmap[modified] Pin
johnalek1-Feb-07 17:20
johnalek1-Feb-07 17:20 
AnswerRe: Add tooltips to resource like bitmap(Urgent) Pin
Rajesh R Subramanian1-Feb-07 17:28
professionalRajesh R Subramanian1-Feb-07 17:28 
AnswerRe: Add tooltips to resource like bitmap(Urgent) Pin
Naveen1-Feb-07 17:38
Naveen1-Feb-07 17:38 
GeneralRe: Add tooltips to resource like bitmap Pin
johnalek1-Feb-07 17:47
johnalek1-Feb-07 17:47 
GeneralRe: Add tooltips to resource like bitmap Pin
Naveen1-Feb-07 17:57
Naveen1-Feb-07 17:57 
AnswerRe: Add tooltips to resource like bitmap[modified] Pin
Hamid_RT2-Feb-07 5:43
Hamid_RT2-Feb-07 5:43 
QuestionC++ code and Bitmap Pin
ricardo montemayor1-Feb-07 17:13
ricardo montemayor1-Feb-07 17:13 
AnswerRe: C++ code and Bitmap Pin
Christian Graus1-Feb-07 18:36
protectorChristian Graus1-Feb-07 18:36 

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.