Click here to Skip to main content
16,011,374 members
Home / Discussions / C#
   

C#

 
QuestionHow to get the IP address of the current host? Pin
bouli11-Jan-06 1:13
bouli11-Jan-06 1:13 
AnswerRe: How to get the IP address of the current host? Pin
mikailcetinkaya11-Jan-06 9:09
mikailcetinkaya11-Jan-06 9:09 
GeneralRe: How to get the IP address of the current host? Pin
Dave Kreskowiak11-Jan-06 9:34
mveDave Kreskowiak11-Jan-06 9:34 
AnswerRe: How to get the IP address of the current host? Pin
Dave Kreskowiak11-Jan-06 9:32
mveDave Kreskowiak11-Jan-06 9:32 
GeneralRe: How to get the IP address of the current host? Pin
bouli11-Jan-06 10:15
bouli11-Jan-06 10:15 
GeneralRe: How to get the IP address of the current host? Pin
Dave Kreskowiak11-Jan-06 10:53
mveDave Kreskowiak11-Jan-06 10:53 
QuestionFinger print scanner Access in C# Pin
Ckhurana11-Jan-06 0:51
Ckhurana11-Jan-06 0:51 
AnswerRe: Finger print scanner Access in C# Pin
Dave Kreskowiak11-Jan-06 5:45
mveDave Kreskowiak11-Jan-06 5:45 
Ckhurana wrote:
Since I am developing this application for local use, i cannot afford the aid SDK's


You just increased your level of difficulty 10 times over. Without the docs, you're pretty much screwed.

Anyway... Any in VB6 ROUGHLY translates to Object in C# and VB.NET. The problem is without seeing the C function header for calling these functions, it's impossible to tell you what the real C# datatype should be and how to pass it.


Ckhurana wrote:
Since I cannot call this dll directly as the IDE doesn't let me add it as a reference, I am using the P/Invoke.


It looks as though this is not a COM .DLL you're calling, so no you can't set a reference to it. You have to P/Invoke it, just the the VB code is doing. A closer extern for C# would be (taken from the VB6 code!):
//  This delegate is a total guess.  Without seeing the function
// header for what the library expects as a callback, you're wasting your time.
public delegate int CallBack(int whatever);
 
[ DllImport( "VFPSimg.dll")] 
public static extern int VFPSinit(int sensorID, ref int numRows, ref int numCols,
        ref int mode, string configFile, int flags, object usrBkgndImage, CallBack func);
 
// Calling the function without a CallBack defined!
int sensorHandle = VFPSinit( sensorID, rows, cols, null, null, flags, null, null);

This code is BY NO MEANS guaranteed to work. Like I keep saying, without the original function headers and documentation, you're just guessing at what you have to pass and how you have to pass it!

For more information on implementing the callback part of this, see this[^] article on MSDN.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

Questionobject initialization Pin
bidisha_tina11-Jan-06 0:06
bidisha_tina11-Jan-06 0:06 
AnswerRe: object initialization Pin
Colin Angus Mackay11-Jan-06 0:13
Colin Angus Mackay11-Jan-06 0:13 
GeneralRe: object initialization Pin
bidisha_tina11-Jan-06 0:29
bidisha_tina11-Jan-06 0:29 
GeneralRe: object initialization Pin
Colin Angus Mackay11-Jan-06 0:40
Colin Angus Mackay11-Jan-06 0:40 
GeneralRe: object initialization Pin
bidisha_tina11-Jan-06 0:51
bidisha_tina11-Jan-06 0:51 
QuestionEventHandling for Controls inserted(OLE way) in a RichTextBox Pin
Linda Thomas10-Jan-06 23:36
Linda Thomas10-Jan-06 23:36 
QuestionFlicker Free Drawing in C# Pin
AB777110-Jan-06 23:11
AB777110-Jan-06 23:11 
AnswerRe: Flicker Free Drawing in C# Pin
[Marc]11-Jan-06 1:44
[Marc]11-Jan-06 1:44 
GeneralRe: Flicker Free Drawing in C# Pin
AB777111-Jan-06 2:00
AB777111-Jan-06 2:00 
GeneralRe: Flicker Free Drawing in C# Pin
J4amieC11-Jan-06 2:29
J4amieC11-Jan-06 2:29 
GeneralRe: Flicker Free Drawing in C# Pin
[Marc]11-Jan-06 16:55
[Marc]11-Jan-06 16:55 
GeneralRe: Flicker Free Drawing in C# Pin
AB777111-Jan-06 17:23
AB777111-Jan-06 17:23 
GeneralRe: Flicker Free Drawing in C# Pin
AB777111-Jan-06 17:24
AB777111-Jan-06 17:24 
GeneralRe: Flicker Free Drawing in C# Pin
AB777111-Jan-06 18:20
AB777111-Jan-06 18:20 
GeneralRe: Flicker Free Drawing in C# Pin
[Marc]11-Jan-06 22:24
[Marc]11-Jan-06 22:24 
GeneralRe: Flicker Free Drawing in C# Pin
AB777111-Jan-06 23:50
AB777111-Jan-06 23:50 
GeneralRe: Flicker Free Drawing in C# Pin
SwitcherSoft30-Mar-11 23:40
SwitcherSoft30-Mar-11 23:40 

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.