-----------------------------------------------------------

New Message on cochindotnet

-----------------------------------------------------------
From: spark
Message 2 in Discussion

hi Sukh, yes this is possible. you basically use a mechanism called P/Invoke. P/Invoke 
lets you call functions from traditional c# programs without much effort. Its rather 
easy to do - take a look at that MCI Console player I had posted some time back. 
http://groups.msn.com/cochindotnet/general.msnw?action=get_message&mview=0&ID_Message=163&LastModified=4675432728935320706
   There is source code for a small cpp program which compiles to a dll and and c# 
program that uses teh function inside that dll.    take a look at that. this is the 
line that it responsible for a lot of the magic [DllImport("mci.dll")]
 static extern int mci(string cmd,StringBuilder sb);
 Here you could give your dll name like : [DllImport("winscard.dll")]
static extern LONG SCardEstablishContext(
  DWORD dwScope,       //<--- change these types 
  LPCVOID pvReserved1,
  LPCVOID pvReserved2,
  LPSCARDCONTEXT phContext
);
 once you have done this, you will need to change each of teh parameters of this 
funtion to .net compatible types - so that when you pass a value from .net it get 
translated to its apprpriate type in the c++ context.   did you understand ?   regards 
rosh  

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/cochindotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to