|
-
Oct 25th, 2001, 09:21 PM
#1
Thread Starter
Fanatic Member
Arrrgh I cant do it :( How clever are you??
Hi all
I am running win 2k
Now i have been helpfully given a reference in c++ to a wonderfull little function in mapi32.dll
I can use dependancy walker to view the function but to get any details on the function eg aliases it may be under or any other such info i need quikview which does not ship with win 2k and is not supported
what I need to know if there are any gurus out there is where i can find the info i need to convert this function into a usable API call for vb
here is the c++ info on the function
Quick Info
Header file: MAPIUTIL.H
Implemented by: MAPI
Called by: Client applications and service providers
SCODE ScLocalPathFromUNC(
LPSTR szUNC,
LPSTR szLocal,
UINT cchLocal
);
Parameters
szUNC
[in] A path in the format \\[server]\[share]\[path] of a file or directory.
szLocal
[out] A path in the format [drive:]\[path] of the same file or directory as for the szUNC parameter.
cchLocal
[in] Size of the buffer for the output string.
See Also
and here is what i have in vb so far
VB Code:
Declare Function ScLocalPathFromUNC Lib "mapi32" (ByVal szUNC As String _
, ByVal szLocal As String, ByVal cchLocal As Integer) As Integer
However when i execute the call it says header entry not found
I know that the call is in mapi32 but it has a @12 after the name so i am assuming it must be able to be called with an alais to it. But blowed if i can work out what that might be
So please calling all gurus lets see how clever you all are
-
Oct 25th, 2001, 09:25 PM
#2
Not sure what you are saying, but there is a MAPI Control in VB. Look in the Component dialog box.
-
Oct 25th, 2001, 09:33 PM
#3
Thread Starter
Fanatic Member
That is no good to me hellswriath for the following reasons
Mapi control in vb uses only a limited number of the functions contained in Mapi32.dll
None of those functions does anything close to what the function does that i am after
That is why i am having to try to convert the information over to a vb api call
I know it can be done
I just need 1 little peice of info and i should be away
-
Oct 25th, 2001, 10:26 PM
#4
PowerPoster
Write a dll in C++ containing that function (I have never done this).
-
Oct 25th, 2001, 10:47 PM
#5
Thread Starter
Fanatic Member
Well
Originally Posted by Abdul
Write a dll in C++ containing that function (I have never done this).
Well I would ................. only I dont know the first thing about c++ so that blows that theory out of the water 
Any other ideas gents??
-
Oct 28th, 2001, 04:09 PM
#6
Thread Starter
Fanatic Member
-
Oct 28th, 2001, 04:44 PM
#7
Fanatic Member
Since the function uses strings, it probably has both a unicode and ANSI form. Try to alias the function as ScLocalPathFromUNCW (unicode) or ScLocalPathFromUNCA (ANSI). One of those may work.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Oct 28th, 2001, 07:08 PM
#8
Thread Starter
Fanatic Member
thanks for the advice Kaverin I tried both options but no joy
-
Oct 28th, 2001, 07:25 PM
#9
Thread Starter
Fanatic Member
okay I have now got it Finding and executing the API Function. I am getting an Integer Value Returned (which i assume is an error code of somesort) So it appears to be working 
here is the functioning API Declaration For any one who is interested
VB Code:
Declare Function ScLocalPathFromUNC Lib "mapi32" Alias "ScLocalPathFromUNC@12" (ByVal szUNC As String _
, ByVal szLocal As String, ByVal cchLocal As Integer) As Integer
Thanks for the inspiration kaverin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|