N
nickmachielse
Hi,
We are dealing with a very strange problem and we cannot figure out
where it comes from so we need some help.
Currently we are implementing the new WPA2 and AES features for
Wireless networks to our applications. These features became available
through the Windows CE QFE from noverber 2006. Untill now we are using
the standard Wireless Zero Config API set but with this QFE a couple
of new API's became available for using WPA2 and AES. These new API's
are basically the same as the old ones but they have an "Ex" extention
( for example: WZCSetInterfaceEx ).
We replaced all old API's with the new API's but a strange problem
occured by implementing the WZCSetInterfaceEx API.
We are running the .net compact framework on Windows CE 5.0. Our
application written in C# is calling a native function using pInvoke.
We can reach this native function without any problems. This native
functions calls WZCSetInterfaceEx and here we get the native
exception: "First-chance exception in COREDLL.DLL. (0xC0000005: Access
Violation)".
The strange thing is the we CAN use this same native function called
from our test application which is also written in C# and is using
exactly the same pInvoke class!!!
We compared all data from our testapplication and our main application
and logged all of it hondreds of times but we could not find anything.
Since we do not have source code for the Wireless Zero Config we are
unable to check where this exception exactly comes from.
This is the pInvoke method we call:
[DllImport( PlatformDll, CharSet = CharSet.Auto )]
private extern static int NETWORK_addWifiNetworks( string
networkName, int InfraMode, int AuthMode, int EncrMode, string key,
int keyEap );
public static int addWifiNetworks( string networkName, int
InfraMode, int AuthMode, int EncrMode, string key, int keyEap )
{
int retVal = NETWORK_addWifiNetworks( networkName,
InfraMode, AuthMode, EncrMode, key, keyEap );
return retVal;
}
The native interface:
int NETWORK_addWifiNetworks( WCHAR networkName[], int infraMode, int
authMode, int encrMode, WCHAR key[], int keyEap )
{
.............
We are dealing with a very strange problem and we cannot figure out
where it comes from so we need some help.
Currently we are implementing the new WPA2 and AES features for
Wireless networks to our applications. These features became available
through the Windows CE QFE from noverber 2006. Untill now we are using
the standard Wireless Zero Config API set but with this QFE a couple
of new API's became available for using WPA2 and AES. These new API's
are basically the same as the old ones but they have an "Ex" extention
( for example: WZCSetInterfaceEx ).
We replaced all old API's with the new API's but a strange problem
occured by implementing the WZCSetInterfaceEx API.
We are running the .net compact framework on Windows CE 5.0. Our
application written in C# is calling a native function using pInvoke.
We can reach this native function without any problems. This native
functions calls WZCSetInterfaceEx and here we get the native
exception: "First-chance exception in COREDLL.DLL. (0xC0000005: Access
Violation)".
The strange thing is the we CAN use this same native function called
from our test application which is also written in C# and is using
exactly the same pInvoke class!!!
We compared all data from our testapplication and our main application
and logged all of it hondreds of times but we could not find anything.
Since we do not have source code for the Wireless Zero Config we are
unable to check where this exception exactly comes from.
This is the pInvoke method we call:
[DllImport( PlatformDll, CharSet = CharSet.Auto )]
private extern static int NETWORK_addWifiNetworks( string
networkName, int InfraMode, int AuthMode, int EncrMode, string key,
int keyEap );
public static int addWifiNetworks( string networkName, int
InfraMode, int AuthMode, int EncrMode, string key, int keyEap )
{
int retVal = NETWORK_addWifiNetworks( networkName,
InfraMode, AuthMode, EncrMode, key, keyEap );
return retVal;
}
The native interface:
int NETWORK_addWifiNetworks( WCHAR networkName[], int infraMode, int
authMode, int encrMode, WCHAR key[], int keyEap )
{
.............