My last idea ...
Try to set the LOGON32_LOGON_NETWORK_CLEARTEXT flag:
LogonUser wUser, wDomain, wPassword, _ LOGON32_LOGON_NETWORK or LOGON32_LOGON_NETWORK_CLEARTEXT, _
LOGON32_PROVIDER_WINNT50, hToken
Look at...
These are the steps to do it:
1) Get the process handle with "GetCurrentProcess"
2) Open the current process with "OpenProcess"
3) Get an access token with "OpenProcessToken"
4) Now you can call "AdjustTokenPrivileges" to set the required privilegs...
Replace
VERSION 5#
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
with
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
I think you don't have the privileges to logon!
You have to set the SE_TCB_NAME and SE_CHANGE_NOTIFY_NAME privileges under win2k. Under winxp these privileges are no longer required!
Hi nimrod44,
Try this:
Dim Excel As Excel.Application
Dim i As Long
On Error Resume Next
Set Excel = New Excel.Application
With Excel.Workbooks.Open("C:\test.xls")
' File Properties
For i = 1 To .BuiltinDocumentProperties.Count
Debug.Print...
Hi gonzoaz,
this is easy!
Make a reference to "TypeLib Information" (tlbinf32.dll).
Dim tlb As TLI.TypeLibInfo
Set tlb = TLI.TypeLibInfoFromFile("MSVBVM60.DLL")
Msgbox tlb.Guid ' GUID as string
That's all
bye
LauDse
Try this:
Create a unique GUID with uuidgen.
Compile your dll with the name of the GUID.
Example:
{12340001-4980-1920-6788-123456789012}.dll
Does anybody tried this?
Bye
LauDse
Hi torturedmind,
There is a api function to open the dialog:
Declare Function WNetConnectionDialog Lib "mpr.dll" Alias "WNetConnectionDialog" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Bye
LauDse
Hi javierbalk,
Try sublclassing the WM_NCCREATE message.
"The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created."
Bye
LauDse
Hi GPerk,
ok i've got it.
Replace your "SelectObject" statement with:
Result = SelectObject(hCC, Picture1.Picture.Handle)
You tried to select a DC into a DC, that's not possible;)
Picture1.Picture.Handle is the handle to the bitmap,
this can be selected into a decice context!
Bye...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.