Click here to Skip to main content
15,893,487 members
Home / Discussions / C#
   

C#

 
GeneralC# - Multidimensionnal array of pointers Pin
Orahn18-Jan-04 7:05
Orahn18-Jan-04 7:05 
GeneralRe: C# - Multidimensionnal array of pointers Pin
leppie18-Jan-04 10:04
leppie18-Jan-04 10:04 
GeneralRe: C# - Multidimensionnal array of pointers Pin
Orahn18-Jan-04 10:09
Orahn18-Jan-04 10:09 
GeneralRe: C# - Multidimensionnal array of pointers Pin
leppie18-Jan-04 10:13
leppie18-Jan-04 10:13 
GeneralRe: C# - Multidimensionnal array of pointers Pin
Heath Stewart18-Jan-04 11:49
protectorHeath Stewart18-Jan-04 11:49 
GeneralRe: C# - Multidimensionnal array of pointers Pin
Orahn18-Jan-04 18:58
Orahn18-Jan-04 18:58 
GeneralRe: C# - Multidimensionnal array of pointers Pin
pat2918-Jan-04 18:58
pat2918-Jan-04 18:58 
GeneralExecuteNonQuery() problem in C# Pin
Qamarwis18-Jan-04 5:10
Qamarwis18-Jan-04 5:10 
GeneralRe: ExecuteNonQuery() problem in C# Pin
Nick Parker18-Jan-04 5:39
protectorNick Parker18-Jan-04 5:39 
GeneralRe: ExecuteNonQuery() problem in C# Pin
Guillermo Rivero18-Jan-04 6:58
Guillermo Rivero18-Jan-04 6:58 
GeneralRe: ExecuteNonQuery() problem in C# Pin
india_nagpur118-Jan-04 20:04
india_nagpur118-Jan-04 20:04 
GeneralCustomCollection + Auto code generation in designer Pin
James Simpson18-Jan-04 3:05
James Simpson18-Jan-04 3:05 
GeneralRe: CustomCollection + Auto code generation in designer Pin
Heath Stewart18-Jan-04 11:45
protectorHeath Stewart18-Jan-04 11:45 
GeneralRe: CustomCollection + Auto code generation in designer Pin
James Simpson18-Jan-04 11:50
James Simpson18-Jan-04 11:50 
Generalado.net Pin
Roger Alsing18-Jan-04 1:30
Roger Alsing18-Jan-04 1:30 
GeneralRe: ado.net Pin
Arjan Einbu18-Jan-04 4:10
Arjan Einbu18-Jan-04 4:10 
GeneralRe: ado.net Pin
Heath Stewart18-Jan-04 11:31
protectorHeath Stewart18-Jan-04 11:31 
Generalcreating a dll with win32 functions, and calling it from C# Pin
misterbear17-Jan-04 23:52
misterbear17-Jan-04 23:52 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
Nick Parker18-Jan-04 5:47
protectorNick Parker18-Jan-04 5:47 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
leppie18-Jan-04 6:15
leppie18-Jan-04 6:15 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
Heath Stewart18-Jan-04 11:24
protectorHeath Stewart18-Jan-04 11:24 
Nick is write that you should include the extern keyword in the P/Invoked method declaration:
[DllImport("MyDll.dll")]
public static extern int sum(int x, int y);
Also make sure that MyDll.dll is in a directory in the PATH environment variable or the application directory so that it can be found. Examples of such directories are C:\Windows, C:\Windows\System32, etc.

I just wanted to add that you can use depends.exe to make sure your functions are exported as you think they should be. Depends is a great Platform SDK tool and, if you choose the default options when installing VS.NET, should be installed. Just run the "Visual Studio .NET Command Prompt" in your VS.NET programs group off the start menu, cd' to the directory with your native DLL, and type "depends.exe MyDll.dll". If you've added the Platform SDK's bin directory to your system or user PATH environment variable (I like to manage all my PATH, INCLUDE, and LIB directories like this), you can just type "depends" in your Start->Run prompt and load your DLL. That will show you your exports.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
misterbear20-Jan-04 6:51
misterbear20-Jan-04 6:51 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
Heath Stewart20-Jan-04 8:24
protectorHeath Stewart20-Jan-04 8:24 
GeneralWeb Service Question Pin
Mazdak17-Jan-04 20:25
Mazdak17-Jan-04 20:25 
GeneralRe: Web Service Question Pin
Heath Stewart18-Jan-04 11:19
protectorHeath Stewart18-Jan-04 11:19 

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.