1. Programming Help

I need someone to write a wrapper for CEUtil.h which I need in my warehouse management software. I would be happy to compensate you for doing this. Here's how it should work. I have clipped this from another forum somewhere.

I found a method in the CEUtil.h Lib (API-Calls and constants). I'm so happy blink

' VBA-Modul in Access 
 
Public Declare Function CeGetDeviceId Lib "ceutil" () As Long 
Public Const CE_Services = "Software\Microsoft\Windows CE Services" 
 
 
Private Function GetDeviceID() As String 
Dim iddvc As Long 
Dim dummy As String 
Dim x, y 
 
GetDeviceID = "" 
 
iddvc = CeGetDeviceId() 
 
Select Case iddvc 
Case 0 
GetDeviceID = "NO" 
Case -1 
GetDeviceID = "GAST" 
Case Else 
' Success ! Device-ID convert. 
' 
dummy = CStr(Hex(iddvc)) 
' The string must be 8 Bytes long 
x = 8 - Len(dummy) 
For y = 1 To x 
dummy = "0" & dummy 
Next y 
 
GetDeviceID = dummy 
 
End Select 
 
End Function 
' 
' Now find the Sync-Folder on the Desktop PC for the connected Pocket PC. 
' ExistKey and GetSettingString are API-Calls from the Registry Lib 
' to get informations (keys) from the registry. 
' 
Private Function GetSyncFolder() As String 
Dim ID, Partner As String 
If ExistKey(HKEY_CURRENT_USER, CE_Services) Then 
ID = GetDeviceID 
Select Case ID 
Case "NO" 
MsgBox "No Pocket PC is connected." 
GetSyncFolder = "" 
Case "GAST" 
MsgBox "You are connected as a guest. No Sync-Folder." 
GetSyncFolder = "" 
Case Else 
Partner = CE_Services & "\Partners\" & ID & "\Services\Synchronization" 
' 
If ExistKey(HKEY_CURRENT_USER, Partner) Then 
GetSyncFolder = GetSettingString(HKEY_CURRENT_USER, Partner, 
"Briefcase Path") 
MsgBox GetSyncFolder 
Else 
MsgBox "Registry Key is not defined. Define a partnership." 
GetSyncFolder ="" 
End If 
' 
End Select 
Else 
MsgBox ("Registry Key is not defined. Install ActiveSync.") 
End If 
End Function 

If you are interested please email me at gwalters a t acu-track.com Thanks

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu