Christian B
Member
- Joined
- Aug 5, 2005
- Messages
- 9
- Programming Experience
- 3-5
Hi,
i have to write a tool in vb.net to configure our Hardware via a serialPort.
One Build of the Software has to run on Win32 and WinCe Machines.
For Win32 i have declared the following:
And for WinCe:
At runtime i decide with
what function call to use.
The Project is completly compiled for CF.
And now the problem:
On Win32 Machines it runs perfectly but under WinCE (Pocket Windows)
CreateFileCe returns no valid CommHandle for Com1 to Com9!
I have heard that there schould be antother App blocking a Port, but I think the Error is another one.
Does anyone can help me to solve this?
Thank you ... Christian
i have to write a tool in vb.net to configure our Hardware via a serialPort.
One Build of the Software has to run on Win32 and WinCe Machines.
For Win32 i have declared the following:
VB.NET:
Private Declare Function CreateFile Lib "kernel32.dll" Alias "CreateFileA" _
(ByVal lpFileName As String, ByVal dwDesiredAccess As Int32, _
ByVal dwShareMode As Int32, ByVal lpSecurityAttributes As IntPtr, _
ByVal dwCreationDisposition As Int32, ByVal dwFlagsAndAttributes As Int32, _
ByVal hTemplateFile As IntPtr) As IntPtr
VB.NET:
Private Declare Function CreateFileCE Lib "coredll.dll" Alias "CreateFileW" _
(ByVal lpFileName As String, ByVal dwDesiredAccess As Int32, _
ByVal dwShareMode As Int32, ByVal lpSecurityAttributes As IntPtr, _
ByVal dwCreationDisposition As Int32, ByVal dwFlagsAndAttributes As Int32, _
ByVal hTemplateFile As IntPtr) As IntPtr
VB.NET:
System.Environment.OSVersion.Platform
The Project is completly compiled for CF.
And now the problem:
On Win32 Machines it runs perfectly but under WinCE (Pocket Windows)
CreateFileCe returns no valid CommHandle for Com1 to Com9!
I have heard that there schould be antother App blocking a Port, but I think the Error is another one.
Does anyone can help me to solve this?
Thank you ... Christian