giving activex dll correct account permisions

giving activex dll correct account permisions

Post by Jame » Thu, 04 Mar 2004 11:29:35


how come i can't print to a network printer from inside my activex dll? i
load this dll in an asp page. the dll just loads a page into a webbrowser
control and then trys to print it. i can call my dll from a normal vb app
and it works fine. my guess is that when IIS loads the dll it is running as
SYSTEM. thats why i tried to use the Impersonate user code as well. i guess
system can't access my network resources like my printers. any one have any
ideas?

'here is my dll code:

Public Function SendPrintJob() As String
On Error GoTo ErrorSub

' navigate to a Web site for testing purposes.
frmPrintOrder.WebBrowser1.Navigate (" http://www.yqcomputer.com/ ")


Do While (frmPrintOrder.WebBrowser1.QueryStatusWB(OLECMDID_PRINT) And
OLECMDF_ENABLED) = 0
DoEvents
Loop

' print the contents of the Web Browser control.
Call frmPrintOrder.WebBrowser1.ExecWB(OLECMDID_PRINT,
OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)

SendPrintJob = "NoErrors"
Exit Function

ErrorSub:
SendPrintJob = "Error #: " & Err.Number & " Desc: " & Err.Description

End Function
<%
'here is my asp code:
Option Explicit
Dim objLogon
dim objPrintOrder
Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser")
objLogon.Logon "user", "password", "domain"
set objPrintOrder = server.CreateObject("jdpPrintOrder.clsPrintOrder")
Response.write objPrintOrder.SendPrintJob
set objPrintOrder = nothing
objLogon.Logoff
Set objLogon = Nothing
%>
--
XXXX@XXXXX.COM
 
 
 

1. Creating an ActiveX dll breaks another ActiveX dll

2. Converting VB ActiveX DLL to VC/ATL gives "type mismatch 13"

Hi there!

I'm trying to convert an extremely simple ActiveX DLL written in VB6
to C++ using ATL (VC7.1).
The VB6 code for the DLL is an example for an addin to a commercial
software also written in VB.
It contains only a single class with one single method.

Using the VS.NET wizard I've created an ATL Project and tried to implement
the same interface.

Although the type library description I get from OLEView seems (nearly)
identical, I get a "type mismatch 13 error" when trying to use the addin.

I would be happy if someone could help finding an answer
to these questions:

1. Are there any special settings or changes needed to make the code
from the wizard "compatible" to VB6 or can I leave it as it is.
2. Has anybody an idea why I get a type mismatch although the
Interface is identical? (At least from what I can see in OLEView)?


Thanks,

Frank

3. accounting soes not seem to give correct info

4. Activex and catch insufficient permision to run it

5. create a local group with permisions or modify power user permisions

6. ActiveX and Permision problem

7. activex exe and activex dll

8. AD Permisions - Computer Account

9. Interforest migration - minimal permisions formigration account

10. ADO fails on ActiveX-EXE while works in ActiveX-DLL

11. Difference between activex exe and activex dll.

12. ActiveX DLL vs. ActiveX Exe

13. Uer Account Profile Permisions

14. ADO fails on ActiveX-EXE while works in ActiveX-DLL

15. Question about ActiveX Controls and ActiveX DLLs.