I have a function that I am trying to write a Declare for in VB. Any help
on it would be appreciated.

The C function looks like this:
WINCRYPT32API HCERTSTORE WINAPI CertOpenStore(
IN LPCSTR lpszStoreProvider, IN DWORD dwEncodingType,
IN HCRYPTPROV hCryptProv, IN DWORD dwFlags, IN const void *pvPara);

What I have got for the VB delcare is:
Public Declare Function CertOpenStore Lib "crypt32.dll"

ByVal lpszStoreProvider As String, ByVal dwMsgAndCertEncodingType As
Long,
ByVal hCyrptProv As Long, ByVal dwFlags As Long, ByVal pvPara As Long)
As Long

I think this is close but that last parameter maybe wrong because it appears
to be a pointer to a pointer.

The next question... How do I actually use that declare. Again it is the
last parameter that gives me problems? In particular what I need to pass in
is a unicode string, or a reference to one rather, but later it could be
something else later.

Any help would be very much appreciated.

Thanks
Sean Woods