Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Typed Collection Utility Pin
Colin Angus Mackay28-May-04 2:48
Colin Angus Mackay28-May-04 2:48 
Generalnice of you Pin
Hesham Amin28-May-04 4:05
Hesham Amin28-May-04 4:05 
GeneralRe: nice of you Pin
Colin Angus Mackay28-May-04 5:00
Colin Angus Mackay28-May-04 5:00 
Generaldeploying application Pin
Ammar Ben Hadj Amor27-May-04 23:25
professionalAmmar Ben Hadj Amor27-May-04 23:25 
QuestionHow to programmitically extract zip file in C# Pin
vinod jadhav27-May-04 22:47
vinod jadhav27-May-04 22:47 
AnswerRe: How to programmitically extract zip file in C# Pin
netclectic27-May-04 23:43
netclectic27-May-04 23:43 
GeneralRemoting Questions Pin
James Simpson27-May-04 22:36
James Simpson27-May-04 22:36 
Generalstrings in DLL calls Pin
Gian27-May-04 21:37
Gian27-May-04 21:37 
i need to call a function of a C DLL. the function is declared as

_EXTERN int __stdcall MyFunction(HWND hWndParent, LPTSTR lpszRow1, LPTSTR lpszRow2, LPTSTR lpszRow3);


so i've defined in my c# code

[DllImport("library.dll", CharSet=CharSet.Auto)]
protected static extern Int32 MyFunction(int hWndParent, StringBuilder lpszRow1, StringBuilder lpszRow2, StringBuilder lpszRow3);


in the C/C++ code i have to pass 3 strings of 42 chars (8-bit each) and the function fills the tree with some names.
in c# i've created 3 StringBuilder variables and initialized to 42 of both length and max capacity.
When i call the function the strings are written but the problem is that each char of the StringBuilder is of 16-bit so 2 characters are in one.
Is there a way to extract each single char or to define a StringBuilder of 8-bit elements? I've tried to use string and LPTStr parameters for the function but the DLL doesnt seem to copy anything in my strings.


Gianmaria
GeneralRe: strings in DLL calls Pin
Gian27-May-04 21:40
Gian27-May-04 21:40 
GeneralChecking connection of some IP to the internet Pin
Den2Fly27-May-04 21:27
Den2Fly27-May-04 21:27 
Generalconformation Pin
sreejith ss nair27-May-04 20:59
sreejith ss nair27-May-04 20:59 
GeneralRe: conformation Pin
Dave Kreskowiak28-May-04 3:36
mveDave Kreskowiak28-May-04 3:36 
GeneralType.GetType Pin
Silly Boy27-May-04 18:53
Silly Boy27-May-04 18:53 
GeneralRe: Type.GetType Pin
ian mariano27-May-04 20:24
ian mariano27-May-04 20:24 
GeneralC# and SQL Autonumber Pin
Antonius_r327-May-04 18:06
Antonius_r327-May-04 18:06 
GeneralRe: C# and SQL Autonumber Pin
Grimolfr28-May-04 3:20
Grimolfr28-May-04 3:20 
GeneralRe: C# and SQL Autonumber Pin
Dave Kreskowiak28-May-04 3:26
mveDave Kreskowiak28-May-04 3:26 
GeneralRe: C# and SQL Autonumber Pin
Antonius_r328-May-04 7:26
Antonius_r328-May-04 7:26 
GeneralRe: C# and SQL Autonumber Pin
Dave Kreskowiak28-May-04 7:54
mveDave Kreskowiak28-May-04 7:54 
GeneralRe: C# and SQL Autonumber Pin
Antonius_r329-May-04 3:48
Antonius_r329-May-04 3:48 
GeneralRe: C# and SQL Autonumber Pin
Dave Kreskowiak29-May-04 14:25
mveDave Kreskowiak29-May-04 14:25 
GeneralRe: C# and SQL Autonumber Pin
Antonius_r329-May-04 18:56
Antonius_r329-May-04 18:56 
GeneralRe: C# and SQL Autonumber Pin
Dave Kreskowiak30-May-04 3:22
mveDave Kreskowiak30-May-04 3:22 
GeneralRe: C# and SQL Autonumber Pin
Antonius_r331-May-04 13:02
Antonius_r331-May-04 13:02 
QuestionHow to make points well -distributed ? Pin
fu027-May-04 18:04
fu027-May-04 18:04 

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.