Click here to Skip to main content
15,889,931 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get position a Child Window & its items? Pin
Member 1063699815-May-14 5:31
Member 1063699815-May-14 5:31 
GeneralRe: How to get position a Child Window & its items? Pin
Member 1063699815-May-14 7:16
Member 1063699815-May-14 7:16 
GeneralRe: How to get position a Child Window & its items? Pin
Eddy Vluggen15-May-14 7:49
professionalEddy Vluggen15-May-14 7:49 
QuestionDatabase in oledb Pin
divya shri15-May-14 1:31
divya shri15-May-14 1:31 
AnswerRe: Database in oledb Pin
V.15-May-14 2:35
professionalV.15-May-14 2:35 
SuggestionRe: Database in oledb Pin
thatraja15-May-14 2:55
professionalthatraja15-May-14 2:55 
Questiondll used in C# application in VS2005 works correctly, but didn't work in VS2012. Pin
sreehari_mysore15-May-14 0:39
sreehari_mysore15-May-14 0:39 
AnswerRe: dll used in C# application in VS2005 works correctly, but didn't work in VS2012. Pin
Freak3015-May-14 2:47
Freak3015-May-14 2:47 
I'm not sure how you ever got this working in VS2005. There are two issues.

First: You can't return a pointer to a char array that you allocated on the stack. The moment the funtion returns the memory is deallocated and a pointer to an unallocated address is returned. You need to allocate the memory using new. This implies that you need to export an additional function that receives a pointer and deletes it (to prevent memory leaks).

Second: In your C# application you define (incorrectly) that the imported function returns a (managed) string. Actually it returns a char pointer. I think you will need an unsafe block to receive the char pointer, initialize a new managed string with it and then delete the char pointer (using the function mentioned above). After that you can assign the managed string to the label.
The good thing about pessimism is, that you are always either right or pleasently surprised.

GeneralRe: dll used in C# application in VS2005 works correctly, but didn't work in VS2012. Pin
sreehari_mysore15-May-14 5:56
sreehari_mysore15-May-14 5:56 
AnswerRe: dll used in C# application in VS2005 works correctly, but didn't work in VS2012. Pin
Bernhard Hiller15-May-14 21:43
Bernhard Hiller15-May-14 21:43 
QuestionCreating Multilingual app in C#.net Pin
diwesh14-May-14 15:06
diwesh14-May-14 15:06 
AnswerRe: Creating Multilingual app in C#.net Pin
Bernhard Hiller14-May-14 21:26
Bernhard Hiller14-May-14 21:26 
AnswerRe: Creating Multilingual app in C#.net Pin
diwesh14-May-14 21:31
diwesh14-May-14 21:31 
QuestionWeird Issue With Web Service Pin
SledgeHammer0114-May-14 7:36
SledgeHammer0114-May-14 7:36 
AnswerRe: Weird Issue With Web Service Pin
Kornfeld Eliyahu Peter14-May-14 10:11
professionalKornfeld Eliyahu Peter14-May-14 10:11 
GeneralRe: Weird Issue With Web Service Pin
SledgeHammer0114-May-14 11:08
SledgeHammer0114-May-14 11:08 
AnswerRe: Weird Issue With Web Service Pin
Kornfeld Eliyahu Peter14-May-14 19:14
professionalKornfeld Eliyahu Peter14-May-14 19:14 
GeneralRe: Weird Issue With Web Service Pin
SledgeHammer0114-May-14 19:25
SledgeHammer0114-May-14 19:25 
AnswerRe: Weird Issue With Web Service Pin
Kornfeld Eliyahu Peter14-May-14 19:37
professionalKornfeld Eliyahu Peter14-May-14 19:37 
AnswerRe: Weird Issue With Web Service Pin
Bernhard Hiller14-May-14 21:36
Bernhard Hiller14-May-14 21:36 
GeneralRe: Weird Issue With Web Service Pin
SledgeHammer0115-May-14 7:12
SledgeHammer0115-May-14 7:12 
GeneralRe: Weird Issue With Web Service Pin
Eddy Vluggen15-May-14 8:20
professionalEddy Vluggen15-May-14 8:20 
GeneralRe: Weird Issue With Web Service Pin
Bernhard Hiller15-May-14 20:54
Bernhard Hiller15-May-14 20:54 
Questionupdate command SQL CE in C# Pin
Lubomír Baloga14-May-14 3:11
Lubomír Baloga14-May-14 3:11 
AnswerRe: update command SQL CE in C# Pin
Eddy Vluggen14-May-14 3:14
professionalEddy Vluggen14-May-14 3:14 

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.