RAPI question

G

Glyn Meek

I am struggling to 'self teach' myself the RAPI interface and using pINVOKES
from within Visual Basic to call the Ce routines.

I am trying to invoke CeFindAllFiles from within Visual Basic, and I have
defined the pInvoke interface as

<DllImport(DllName, CharSet:=CharSet.Unicode)> _
Public Shared Function CeFindAllFiles( _
ByVal szPath As String _
, ByVal dwFlags As FAF _
, ByRef lpdwFoundCount As Integer _
, ByRef ppFindDataArray As IntPtr _
) As Integer
End Function

I have also defined the CE_FIND_DATA structure as

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode, Pack:=4)> _
Public Structure CE_FIND_DATA
Public dwFileAttributes As Integer
Public ftCreationTime As FILETIME
Public ftLastAccessTime As FILETIME
Public ftLastWriteTime As FILETIME
Public nFileSizeHigh As Integer
Public nFileSizeLow As Integer
Public dwOID As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=MAX_PATH)> _
Public cFileName As String
End Structure

BUT...I have no idea how to set up a VB data element as 'ByRef
ppFindDataArray As IntPtr' so that I can define the call to CeFindAllFiles
in VB and get back data that I can actually access..Can some C++/VB genius
out there give me a hint here?

hopefully

Glyn J Meek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top