Click here to Skip to main content
15,914,222 members
Home / Discussions / COM
   

COM

 
AnswerRe: Error loading type library/DLL Pin
Lim Bio Liong9-Sep-08 1:35
Lim Bio Liong9-Sep-08 1:35 
GeneralRe: Error loading type library/DLL Pin
Sara1239-Sep-08 18:55
Sara1239-Sep-08 18:55 
GeneralRe: Error loading type library/DLL Pin
Lim Bio Liong9-Sep-08 19:23
Lim Bio Liong9-Sep-08 19:23 
AnswerRe: Error loading type library/DLL Pin
Ju@ncho19-Sep-08 10:01
Ju@ncho19-Sep-08 10:01 
GeneralRe: Error loading type library/DLL Pin
Ju@ncho19-Sep-08 10:06
Ju@ncho19-Sep-08 10:06 
QuestionActivex Control ->Running Programaticly [modified] Pin
michael@cohen6-Sep-08 22:57
michael@cohen6-Sep-08 22:57 
AnswerRe: Activex Control ->Running Programaticly Pin
guestcat11-Sep-08 22:38
guestcat11-Sep-08 22:38 
QuestionPrinting with COM in Web Pin
LeBarros5-Sep-08 9:27
LeBarros5-Sep-08 9:27 
Greetings to all,
My goal is to create an assembly that will allow me to print via the web directly from the Windows API, in order to make prints from any type of printer such as matrix (text mode) or others (mostly so graphic).

The problem is that the Internet Explorer (IE) recognizes and accepts the assembly set up. NET 2.0. The problem is knowing where lies the error, Below there's a brief explanation of what I have done:

I have a first project which is a class library of vb in this class is my impression that accesses the api, compiled this class and I have my first assembly. (LinePrinter.dll)

The second project is also a class library, but I have an UserControl in it because I need interaction screen in my constituent assembly to call the PrintDialog, the form has size 0px; 0px because the only thing that interests me is to show the dialog printing to choose the printer to use and then call the printing method, prior to that I refer to the assembled print (LinePrinter.dll). In this class you call PrintX in this class, which is as follows:

Imports System.Reflection
Imports System.Runtime.InteropServices
Imports Microsoft.Win32

Public Interface Printx
Sub texto(ByVal str As String)
End Interface

<comvisible(true)> _
<progid("imprimir")> _
<classinterface(classinterfacetype.autodual)> _
<guid("d6967c5a-22ee-484a-b2d6-9f90f54b85eb")> _

Public Class imprimir
Implements Printx

<comvisible(true)> _
Public Sub texto(ByVal str As String) Implements Printx.texto
If PrintDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Try
Dim ln As LinePrinter.LinePrinter = New LinePrinter.LinePrinter(PrintDialog1.PrinterSettings.PrinterName)
ln.WriteLine(str, True)
ln.EndJob(False)
Catch ex As Exception
MsgBox("Error printin: " + ex.ToString())
End Try
End If
End Sub
End Class

Then I created a signature(.snk) assembly to each project, the snk was created from properties tab of the project "Signing the assembly" and i enable the COM visibility to the UserControl project.

Then compile and create a .CAB file to host both dlls.

HTML is composed this way:

<object id="MiPrintX" name="MiPrintX">
classid="clsid: D6967C5A-22EE-484a-B2D6-9F90F54B85EB" VIEWASTEXT codebase="../scImprX.CAB">

Testing in local network works perfectly if I upload my Web site as a secure site and lowering levels of security; but when a put it in production o a realintranet, I get a message saying that the ActiveX has no name and key safe.

Hope you can help me I'm in a big trouble Cry | :((
Thanks very much
LindaB
QuestionLearning curve for 2003 COM addin [modified] Pin
Hatobeya5-Sep-08 4:28
Hatobeya5-Sep-08 4:28 
AnswerRe: Learning curve for 2003 COM addin Pin
Baltoro14-Sep-08 10:57
Baltoro14-Sep-08 10:57 
GeneralRe: Learning curve for 2003 COM addin Pin
Hatobeya17-Sep-08 2:33
Hatobeya17-Sep-08 2:33 
GeneralRe: Learning curve for 2003 COM addin Pin
Baltoro17-Sep-08 13:17
Baltoro17-Sep-08 13:17 
QuestionRemote Call a COM Object Pin
Anoop Brijmohun3-Sep-08 0:36
Anoop Brijmohun3-Sep-08 0:36 
AnswerRe: Remote Call a COM Object Pin
prasad_som3-Sep-08 4:59
prasad_som3-Sep-08 4:59 
QuestionIssue while passing variant safearray to ADO recordset Pin
sivasankar anumula1-Sep-08 1:12
sivasankar anumula1-Sep-08 1:12 
AnswerRe: Issue while passing variant safearray to ADO recordset Pin
prasad_som3-Sep-08 5:02
prasad_som3-Sep-08 5:02 
Questionbasic problem about atl Pin
ice87111726-Aug-08 19:33
ice87111726-Aug-08 19:33 
AnswerRe: basic problem about atl Pin
Shaileshvb27-Aug-08 19:21
Shaileshvb27-Aug-08 19:21 
AnswerRe: basic problem about atl Pin
Michael Dunn29-Aug-08 13:32
sitebuilderMichael Dunn29-Aug-08 13:32 
QuestionHow to call Com dll from VC++ .NET 2005? Pin
amalhotr26-Aug-08 7:39
amalhotr26-Aug-08 7:39 
AnswerRe: How to call Com dll from VC++ .NET 2005? Pin
Michael Dunn29-Aug-08 13:34
sitebuilderMichael Dunn29-Aug-08 13:34 
QuestionRemove All referance of OCX file from PC Pin
ASysSolvers26-Aug-08 6:17
ASysSolvers26-Aug-08 6:17 
AnswerRe: Remove All referance of OCX file from PC Pin
Ju@ncho11-Sep-08 2:51
Ju@ncho11-Sep-08 2:51 
QuestionHow to Get the 'fvalue' from an html option button Pin
Member 379724125-Aug-08 12:52
Member 379724125-Aug-08 12:52 
Question...Hiding folders from Explorer Pin
Attilah25-Aug-08 3:39
Attilah25-Aug-08 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.