473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Aladdin Etoken Pro USB device

OS : Windows XP Professional
Environment : MS Visual Studio 2005
Language : C#

Hi, I am trying to write a windows application using C# that accesses
the Aladdin Etoken Pro USB device. (www.aladdin.com)
I am using [DllImport("eToken.dll")] to import functions but i am not
sure about the following things :
1, Can i just only import 1 function at a time ?
2, What happens when the unmanaged function in the dll that i am
importing has data types that do not exist in the class under C# ? Do
i use the MarshallbyAttribute function or how does it work ?
3, Does someone have a c# sample about importing unmanaged functions
via dll ?
Any help welcome ! I spend my whole day on this so i want to get going.

Seems like that there aren't a lot of people out there whom want to
program the etoken in C#.
Zoltan.

Nov 6 '06 #1
2 4914
Hi,

<zo****************@yahoo.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
OS : Windows XP Professional
Environment : MS Visual Studio 2005
Language : C#

Hi, I am trying to write a windows application using C# that accesses
the Aladdin Etoken Pro USB device. (www.aladdin.com)
I am using [DllImport("eToken.dll")] to import functions but i am not
sure about the following things :
1, Can i just only import 1 function at a time ?
Yes, in fact that is the only way, you declare a method ( a function in the
dll) and especify where that function is declared.
>
2, What happens when the unmanaged function in the dll that i am
importing has data types that do not exist in the class under C# ? Do
i use the MarshallbyAttribute function or how does it work ?
What kind of types?
>
3, Does someone have a c# sample about importing unmanaged functions
via dll ?
See any example of [DllImport] , also go to pinvoke.net it has lot of info
about p/invoke
--
Ignacio Machin
machin AT laceupsolutions.com
Nov 6 '06 #2

Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

<zo****************@yahoo.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
OS : Windows XP Professional
Environment : MS Visual Studio 2005
Language : C#

Hi, I am trying to write a windows application using C# that accesses
the Aladdin Etoken Pro USB device. (www.aladdin.com)
I am using [DllImport("eToken.dll")] to import functions but i am not
sure about the following things :
1, Can i just only import 1 function at a time ?
Yes, in fact that is the only way, you declare a method ( a function in the
dll) and especify where that function is declared.
Thank you !

2, What happens when the unmanaged function in the dll that i am
importing has data types that do not exist in the class under C# ? Do
i use the MarshallbyAttribute function or how does it work ?

What kind of types?

DWORD etCreateTalker (
LPCTSTR lpszReaderName,
LPHTALKER phTalker,
DWORD dwFlags
);

I can't import neither LPCTSTR nor LPHTALKER. Both of them are specific
to the eToken.
>

3, Does someone have a c# sample about importing unmanaged functions
via dll ?

See any example of [DllImport] , also go to pinvoke.net it has lot of info
about p/invoke
Thank you !
>
--
Ignacio Machin
machin AT laceupsolutions.com
Nov 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: tech.witch | last post by:
I'm doing a postmortem from an outage at my workplace that looks too similar to an outage we had last fall to not be related. Both database outages had the following characteristics: 1) VERY...
22
by: Jan Richter | last post by:
Hi there, the Code below shows DJBs own implementation of strlen (str_len): unsigned int str_len(char *s) { register char *t; t = s; for (;;) { if (!*t) return t - s; ++t;
12
by: Steve | last post by:
I wrote a simple virtual device driver int15.sys, Is C# support load the device driver from AP?
8
by: Tony Liu | last post by:
I am having a "Null Device is Missing" compile error when compiling a c++ project. The documentation from MSDN said it could be caused by low system resource or the user account does not have...
7
by: Ritu | last post by:
Hi All, Can any body please tell me how i can write a device driver using CSharp. Thanks, Ritu
2
by: Rosalind Chen | last post by:
Hi, This is the first time that I use Visual Studio .NET. And I stucked in this first problem. - I created a SDK from Platform builder 4.2 that includes .Net Compact Framework. - installed...
0
by: activeashish | last post by:
dear frds , i wd like to read and write data from etoken usp.Do any class/dll in .net support this feature.If any one knew abt this do forward to me thanks in advance
8
by: Konstantin Andreev | last post by:
Hello. I'm experiencing very disagreeable problem: DB2 refuses tablespace containers, which are DEVICE's bigger than 4G. So, If I below 4G limit: | # db2 create tablespace TS1 pagesize 4096...
0
by: Shival | last post by:
Hi, I have a Device that will be used by dentist to take their paitient teaath pics. this Device is having a click button from which the device takes pics. The Device is configured to my OS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.