vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
NEU! sevCoolbar 3.0 - Professionelle Toolbars im modernen Design!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2024
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

Fortgeschrittene Programmierung
Re: Zugriff auf Pocket PC wie im Windows Explorer 
Autor: Mattes
Datum: 28.06.07 10:44

Hi,
sorry, ich hätte Dich fast vergessen, da ich bezüglich Arbeit momentan viel um die Ohren habe.
Den folgenden Code habe ich aus meinem Rapi Modul kopiert. Er enthält einige Api Deklarationen für den Pocket PC. Ich hoffe Du kannst damit was Anfangen. Ansonsten meld Dich einfach. Bei mir ist es zeitlich nur etwas schwierig im moment.

Also hier nur der Code:


Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const ERROR_SUCCESS = 0
Public Const REG_DWORD = 4 '32-bit number.
Public Const REG_SZ = 1

Public Const INVALID_HANDLE = -1
Public Const GENERIC_READ = &H80000000
Public Const GENERIC_WRITE = &H40000000 '(1073741824)
Public Const FILE_SHARE_READ = 1
Public Const FILE_SHARE_WRITE = 2
Public Const CREATE_ALWAYS = 2
Public Const OPEN_EXISTING = 3
Public Const INIT_SUCCESS = 0
Public Const WRITE_ERROR = 0
Public Const READ_ERROR = 0
Public Const FILE_ATTRIBUTE_NORMAL = 128


Declare Function CeRapiInitEx Lib "rapi.dll" ( _
pRapiInit As RAPIINIT) As Long

Declare Function CeRapiUninit Lib "rapi.dll" () As Long

Declare Function CeCloseHandle Lib "rapi.dll" (ByVal hObject As Long) As Long

'Registry Funktion
Declare Function CeRegOpenKeyEx Lib "rapi.dll" ( _
ByVal hkey As Long, _
ByVal lpSubKey As Long, _
ByVal ulOptions As Long, _
ByVal samDesired As Long, _
phkResult As Long) As Long

Declare Function CeRegQueryValueEx Lib "rapi.dll" ( _
ByVal hkey As Long, _
ByVal lpValueName As Long, _
ByVal lpReserved As Long, _
lpType As Long, _
ByVal lpdata As Long, _
lpcbData As Long) As Long

Declare Function CeRegQueryValueExString Lib "rapi.dll" _
Alias "CeRegQueryValueEx" ( _
ByVal hkey As Long, _
ByVal lpValueName As Long, _
ByVal lpReserved As Long, _
lpType As Long, _
ByVal lpdata As Long, _
lpcbData As Long) As Long

Declare Function CeRegQueryValueExLong Lib "rapi.dll" _
Alias "CeRegQueryValueEx" ( _
ByVal hkey As Long, _
ByVal lpValueName As Long, _
ByVal lpReserved As Long, _
lpType As Long, _
lpdata As Long, _
lpcbData As Long) As Long

Declare Function CeRegCloseKey Lib "rapi.dll" ( _
ByVal hkey As Long) As Long

'File Funtionen
Declare Function CeDeleteFile Lib "rapi.dll" (ByVal lpFileName As Long) As Long

Declare Function CeFindFirstFile Lib "rapi.dll" ( _
ByVal lpFileName As Long, _
lpFindFileData As CE_FIND_DATA) As Long

Declare Function CeFindNextFile Lib "rapi.dll" (ByVal hFindFile As Long, _
lpFindFileData As CE_FIND_DATA) As Long

Public Declare Function CeCreateFile Lib "rapi.dll" ( _
ByVal lpFileName As Long, _
ByVal dwDesiredAccess As Long, _
ByVal dwShareMode As Long, _
lpSecurityAttributes As SECURITY_ATTRIBUTES, _
ByVal dwCreationDistribution As Long, _
ByVal dwFlagsAndAttributes As Long, _
ByVal hTemplateFile As Long) As Long


Declare Function CeReadFile Lib "rapi.dll" (ByVal hFile As Long, _
lpBuffer As Any, _
ByVal nNumberOfBytesToRead As Long, _
lpNumberOfBytesRead As Long, _
ByVal CeReadFileNull As Long) As Long

Declare Function CeCopyFile Lib "rapi.dll" (CurrentPath As Long, _
NewPath As Long, Overwrite As Boolean) As Long



Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type

Type FILETIME
dwHighDateTime As Long
dwLowDateTime As Long
End Type


Type CE_FIND_DATA
dwFileAttributes As Long
ftCreationTime As FILETIME
ftLastAccessTime As FILETIME
ftLastWriteTime As FILETIME
nFileSizeHigh As Long
nFileSizeLow As Long
dwOID As Long
cFileName(0 To 259) As Integer
End Type


Type RAPIINIT
cbsize As Long
heRapiInit As Long
hrRapiInit As Long
End Type

' Initialize RAPI
Function ConnectRapi() As Long
Dim lcon As Long
Dim lRapiInit As RAPIINIT
CeRapiUninit
DoEvents
With lRapiInit
.cbsize = Len(lRapiInit)
.heRapiInit = 0
.hrRapiInit = 0
End With

lcon = CeRapiInitEx(lRapiInit)

ConnectRapi = lcon
End Function


' Uninitialize RAPI
Function DisconnectRapi() As Long
Dim lcon As Long
lcon = CeRapiUninit
DisconnectRapi = lcon
End Function


P.S.:
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Zugriff auf Pocket PC wie im Windows Explorer2.277Mattes01.12.04 08:44
Re: Zugriff auf Pocket PC wie im Windows Explorer1.336dMueller24.06.07 09:58
Re: Zugriff auf Pocket PC wie im Windows Explorer1.254Mattes25.06.07 13:55
Re: Zugriff auf Pocket PC wie im Windows Explorer1.208dMueller25.06.07 18:02
Re: Zugriff auf Pocket PC wie im Windows Explorer1.418Mattes28.06.07 10:44
Re: Zugriff auf Pocket PC wie im Windows Explorer1.542Mattes28.06.07 10:46
Re: Zugriff auf Pocket PC wie im Windows Explorer1.133dMueller03.07.07 09:59
Re: Zugriff auf Pocket PC wie im Windows Explorer1.208luet03.07.07 22:09
Re: Zugriff auf Pocket PC wie im Windows Explorer1.274Mattes05.07.07 09:48
Re: Zugriff auf Pocket PC wie im Windows Explorer1.252Mattes05.07.07 09:49
Re: Zugriff auf Pocket PC wie im Windows Explorer1.184luet03.07.07 07:26
Re: Zugriff auf Pocket PC wie im Windows Explorer1.359dMueller16.09.07 15:18
Re: Zugriff auf Pocket PC wie im Windows Explorer1.162snowmanmh16.09.07 15:55
Re: Zugriff auf Pocket PC wie im Windows Explorer1.361dMueller16.09.07 16:21
Re: Zugriff auf Pocket PC wie im Windows Explorer1.146dMueller16.09.07 16:23
Re: Zugriff auf Pocket PC wie im Windows Explorer1.150snowmanmh16.09.07 20:41
Re: Zugriff auf Pocket PC wie im Windows Explorer1.141luet16.09.07 20:46
Re: Zugriff auf Pocket PC wie im Windows Explorer1.129dMueller16.09.07 22:57
Re: Zugriff auf Pocket PC wie im Windows Explorer1.252luet17.09.07 07:19

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2024 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel