|
-
May 3rd, 2003, 02:41 PM
#1
Thread Starter
New Member
Calling a System32 file like advapi32.dll?
Im trying to call this dll in the system32 dir. but with know luck!!
this is a web app the asp is calling MY GenCrypto.dll and this dll calles advapi32.dll from the system32 dir
error's like = "he system cannot find the file specified"
or "dependencies missing for GenCrypto.dll"
Sample code
Private Declare Function CryptAcquireContext Lib "advapi32.dll" Alias "CryptAcquireContextW"(ByRef phProv As Integer, ByRef pszContainer As Byte, ByRef pszProvider As Byte, ByVal dwProvType As Integer, ByVal dwFlags As Integer) As Integer
this code fails with "The system cannot find the file specified"
what's missing, security, a link, to the oject, or am i just stupid?
the same dll code has been built for an GenCrypto.exe (works fine) and the dll being called by the web app not working..
Thanks
-
May 3rd, 2003, 03:45 PM
#2
Fanatic Member
The "cannot find file" error is suspicious - it may be that the way the dll is being invoked isn't able to locate advapi32.dll because in some way it requires a system environment variable? Why don't you see what happens if you specify the full path/filename for advapi32.dll.
-
May 3rd, 2003, 04:12 PM
#3
Thread Starter
New Member
Slow_Learner thanks for the help...
this is the same error evertime.
File or assembly name CasinoUtils2003, or one of its dependencies, was not found
asp calls -------->
CasinoUtils2003.dll calls ------>
GenCrypto.dll and this is were advapi32.dll and kernel32.dll is being called from.
i changed the call to :
Private Declare Function CryptAcquireContext Lib "C:\\WINNT\\System32\\advapi32.dll" Alias "CryptAcquireContextW" (ByRef phProv As Integer, ByRef pszContainer As Byte, ByRef pszProvider As Byte, ByVal dwProvType As Integer, ByVal dwFlags As Integer) As Integer
same error
thanks
-
May 3rd, 2003, 04:47 PM
#4
Fanatic Member
Well what about the declare for CasinoUtils2003.dll? The error seems to indicate that's the file that can't be found, before you get to the call for advapi32.dll. Why don't you try specifying the full path for >that< call?
-
May 3rd, 2003, 04:52 PM
#5
Fanatic Member
That's a real shot in the dark - I suck at API programming in general, and have no experience with ASP. But I really think that "file not found" is suspicious, it seems like it would be something simple.
-
May 3rd, 2003, 04:59 PM
#6
Fanatic Member
-
May 3rd, 2003, 05:31 PM
#7
Thread Starter
New Member
thanks again Slow_Learner
the webapps dll's were built with vb6 and all works fine.
trying to upgraded to vb.net so these dll's are not working ...
the basics i understand (i think) it converting it to vb.net
thats started this problem..
-
May 5th, 2003, 02:02 AM
#8
yay gay
if u upgraded them to .NET then u cant use the API method of invoking them but must use REFLECTION or add a reference to them or if u're using vb.net them you can use Activator.CreateInstance() and then use late binding to use it's methods
\m/  \m/
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
|