Home

Support

RFIDeasStore

Contact

Solutions for Identification and Access


Home

USB Connection Solution

Solutions

Technologies

Products

Cards

Readers

Converters

Presence Detector

Support

Some DELL computer users may experience a problem with the pcProx-USB proximity card reader. The pcProx reader will output data in the keystrokeing mode, but the configuration program has difficulty connecting.

The solution is to remove the application DellTouch. This program apparently configures the USB port for “human interface devices” as restricted for exclusive hardware access.

from a customer: “We found that the HIDclass.sys version 1125 was the culprit. This version of HIDclass.sys was replaced with version 1106 from an OEM Dell machine, after which the pcProx reader responded as excepted. However, if one deletes the HIDclass.sys file the IBM XP OS will recreate the HIDclass.sys version 1125 resulting in a non-working pcProx reader.”
 

Learning Center

Wiegand Converter Board

Downloads

Docs

Tech Notes

Errata Note

Problem: The Vrdr (Switched 5V) pin does not return to 5V after the USB port is re-awakened from a sleep or low power state.

Partners

Calling DLLs from .NET

Resellers

Media

News

Awards

Comments

Hi-Res Photos

Store

ORDER NOW

RETURN TO CART

About RF IDeas

History

Contact

Credit Appl and...


This article (from http://www.codeproject.com/useritems/dynamicinvokedll.asp) demonstrates how to call an unmanaged MFC dll function from a C# code. Code using Reflection namespace. To use code snippets below you must add following.

using System.Reflection.Emit;

using System.Reflection;

Imagine you have a MFC dll (getmyversion.dll) with function named int GetDllversion(char* verstr) which returns your dll's version in verstr.

Below function creates a dynamic assembly object. And using DefinePInvokeMethod method creates a method which we will use it to access our dll function. To complete our global ops for our dynamic module call CreateGlobalFunctions. Using GetMethod function of our previously created method we can invoke our mfc dll funtion.

public object DynamicDllFunctionInvoke( string DllPath, string EntryPoint )
{
// Version string definition
byte[] verstr = new byte[1024];
//Define return type of your dll function.
Type returnType = typeof(int);
//out or in parameters of your function.
Type [] parameterTypes = {typeof(byte[])};
object[] parameterValues = {verstr};
string entryPoint = entrypoint;

// Create a dynamic assembly and a dynamic module
AssemblyName asmName = new AssemblyName();
asmName.Name = "tempDll";
AssemblyBuilder dynamicAsm =
AppDomain.CurrentDomain.DefineDynamicAssembly(asmName,
AssemblyBuilderAccess.Run);
ModuleBuilder dynamicMod =
dynamicAsm.DefineDynamicModule("tempModule");

// Dynamically construct a global PInvoke signature
// using the input information
MethodBuilder dynamicMethod = dynamicMod.DefinePInvokeMethod(
entryPoint, DllPath, MethodAttributes.Static | MethodAttributes.Public
| MethodAttributes.PinvokeImpl , CallingConventions.Standard,
returnType, parameterTypes, CallingConvention.Winapi,
CharSet.Ansi);

// This global method is now complete
dynamicMod.CreateGlobalFunctions();

// Get a MethodInfo for the PInvoke method
MethodInfo mi = dynamicMod.GetMethod(EntryPoint);
// Invoke the static method and return whatever it returns
object retval = mi.Invoke(null, parameterValues);
// Filled verstr paramter.
MessageBox.Show(System.Text.ASCIIEncoding.ASCII.GetString(verstr));
return retval;
}


Sample calling of the method is below.

DynamicDllFunctionInvoke(@"c:\getmyversion.dll","GetDllVersion");
calaquendi
 

 

(C) 2003, 06 RF IDeas, Inc. All rights reserved

Questions?   Call 866-439-4884 Toll-free, or 847-870-1723  or e-mail Sales@RFIDeas.com