Click here to Skip to main content
15,910,083 members
Home / Discussions / C#
   

C#

 
GeneralRe: opening and compiling VS 2005 projects with VS 2003 ? Pin
CWIZO11-Apr-06 22:29
CWIZO11-Apr-06 22:29 
GeneralRe: opening and compiling VS 2005 projects with VS 2003 ? Pin
hasantayyar11-Apr-06 22:46
hasantayyar11-Apr-06 22:46 
GeneralRe: opening and compiling VS 2005 projects with VS 2003 ? Pin
CWIZO11-Apr-06 23:01
CWIZO11-Apr-06 23:01 
QuestionDllImport call unmanaged code Pin
Killer311-Apr-06 20:42
Killer311-Apr-06 20:42 
AnswerRe: DllImport call unmanaged code Pin
alexey N11-Apr-06 20:51
alexey N11-Apr-06 20:51 
GeneralRe: DllImport call unmanaged code Pin
Killer311-Apr-06 21:10
Killer311-Apr-06 21:10 
GeneralRe: DllImport call unmanaged code Pin
alexey N11-Apr-06 22:31
alexey N11-Apr-06 22:31 
AnswerRe: DllImport call unmanaged code Pin
shezh12-Apr-06 0:53
shezh12-Apr-06 0:53 
I had a similar function that returned a string from a C++ dll. Try declaring a global char array in your dll and then copy the string into the array, as below:

// global char array<br />
char szReturn[MAX_PATH];<br />
<br />
BOOL APIENTRY DllMain( HANDLE hModule, <br />
                       DWORD  ul_reason_for_call, <br />
                       LPVOID lpReserved<br />
					 )<br />
{<br />
    return TRUE;<br />
}<br />
<br />
__declspec(dllexport) LPCTSTR Test()<br />
{<br />
     <br />
     lstrcpy(szReturn,"success!");<br />
     return szReturn;<br />
}


Hope that helps Wink | ;)
Questionproblem Pin
pankajgarg1211-Apr-06 20:36
pankajgarg1211-Apr-06 20:36 
AnswerRe: problem Pin
hasantayyar11-Apr-06 20:59
hasantayyar11-Apr-06 20:59 
GeneralRe: problem Pin
Colin Angus Mackay11-Apr-06 23:18
Colin Angus Mackay11-Apr-06 23:18 
AnswerRe: Please write better subjects Pin
Guffa11-Apr-06 21:32
Guffa11-Apr-06 21:32 
AnswerRe: problem Pin
Colin Angus Mackay11-Apr-06 23:20
Colin Angus Mackay11-Apr-06 23:20 
Questionproblem Pin
pankajgarg1211-Apr-06 20:33
pankajgarg1211-Apr-06 20:33 
AnswerRe: Please write better subjects Pin
Guffa11-Apr-06 21:18
Guffa11-Apr-06 21:18 
Questionproblem Pin
pankajgarg1211-Apr-06 20:32
pankajgarg1211-Apr-06 20:32 
AnswerRe: problem Pin
alexey N11-Apr-06 20:36
alexey N11-Apr-06 20:36 
GeneralRe: problem Pin
Guffa11-Apr-06 23:03
Guffa11-Apr-06 23:03 
Questionidea of a very special 'Menuitem' Pin
nuessler11-Apr-06 20:16
nuessler11-Apr-06 20:16 
AnswerRe: idea of a very special 'Menuitem' Pin
alexey N11-Apr-06 20:26
alexey N11-Apr-06 20:26 
GeneralRe: idea of a very special 'Menuitem' Pin
nuessler11-Apr-06 21:34
nuessler11-Apr-06 21:34 
GeneralRe: idea of a very special 'Menuitem' Pin
alexey N11-Apr-06 22:42
alexey N11-Apr-06 22:42 
AnswerRe: idea of a very special 'Menuitem' Pin
deanofharvard12-Apr-06 9:32
deanofharvard12-Apr-06 9:32 
QuestionStar Application with Windows Pin
hung_ngole11-Apr-06 18:13
hung_ngole11-Apr-06 18:13 
AnswerRe: Star Application with Windows Pin
alexey N11-Apr-06 18:23
alexey N11-Apr-06 18:23 

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.