|
I wirte a few dlls ,then registe them . However I can not create instance using the following code. What is the reason?
IGraphBuilder * pBuilder = NULL;
HRESUTL hr = CoCreateInstance(....);
....
There is a will,there is a way!
|
|
|
|
|
Is the COM dll registered? worth trying regsvr32.exe to register it.
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
lichongbin wrote: I wirte a few dlls ,then registe them . However I can not create instance using the following code. What is the reason?
Did you made a COM DLL?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi,
I have created a Dialog based application in VC++ 6.0(Client) and an ATL COM component (Server).
But I dont know where and how to invoke the interface in the client. Can any one explain how to make use of ATL COM server in dialog based application(client).
If not at least provide me a url where I can find details of creating client for ATL COM in VC++ 6.0.
Thanks
Mahadevan
|
|
|
|
|
|
Well, you have to:
(1) initialize COM, calling CoInitialize
(2) create an instance of you object, calling CoCreateInstance
(3) (optionally) ask for another interface
(4) call your interface methods
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Need to create moniker that handles path strings like "./boe2.xml" and "file:///d|/boe2.xml".
I've used MkParseDisplayNameEx() in my IBindHost::CreateMoniker() implementation and it works for the second type of pathes, but doesn't handle first type. I've tried CreateFileMoniker but it doesn't work too. What should I do?
|
|
|
|
|
Hi to All,
I am creating COM Wrappers(CCW's) to the existing .Net Product, which is developed using C#. In this, am getting problem with setting "Item" propertty as the Default Property. My requirement is like this:
I created 4 classess in CCW namely: PdfDocument, PdfForm,PdfFormField and PdfFormFieldList. to the respective .Net classess. Below, am giving the classess in brief. I configured my project for COM Interop .
*****************************************************************************************************************************************
PdfDocument:
public class PdfDocument
public readonly property Form() as PdfForm
get
''''''' code for returning PdfForm type
end get
end propety
end class
PdfForm:
public class PdfForm
public readonly property Fields() as PdfFormFieldList
get
''''''' code for returning PdfFormFieldList Type
end get
end property
end class
PdfFormFieldList
public class PdfFormFieldList
default public readonly property Item(byval pdfformfiled as PdfFormField) as PdfFormField
get
''''' code for returning PdfFormField type
end get
end property
end class
*****************************************************************************************************************************************
Using the above 4 classes, I want the behavior like below in classic ASP.
Code in classic ASP:
dim doc
set doc = server.createobject("DynamicPDF.PdfDocument")
''''' Instead of calling: doc.Form.Fields.Item(("name of the Pdfformfield")
response.write(doc.Form.Fields("name of the Pdfformfield")
Same code in VB6
dim doc as new PdfDocument
''''' Instead of calling: doc.Form.Fields.Item(("name of the Pdfformfield")
msgbox(doc.Form.Fields(("name of the Pdfformfield")
In Vb6, "Item" porperty is working fine. But, it is not working in classic ASP as a Default Property.In ASP, it is working fine only when I code like: doc.Form.Fields.Item(("name of the Pdfformfield")
I need your help in this regard.
|
|
|
|
|
|
this's a MFC AcitveX project, in the CXXXXCtrl's OnCreate function, i create a modeless dialog(WS_CHILD). the dialog have some buttons on it.
Now, run this ActiveX, make one of the buttons to have focus(for example: click it), then check the button's style in spy++, the button's style has been set BS_DEFPUSHBUTTON.
can somebody tell me why this happened, and how to stop it?
best regard
|
|
|
|
|
Hello, we are developing application which uses MODI(Microsoft Office Document Imaging) library for OCR the documents. It`s working ok on development machines (Windows XP Sp2) but not working on Windows Vista. During the executing of OCR method of Modi.Document class error has been thrown - 'Ocr running error'. We couldn't find useful information on the internet. Does anybody know useful solution?
MODI.Document recognizedDocument = null;
recognizedDocument = new MODI.Document();
recognizedDocument.Create(tempFileName); // Some existing tif image file
recognizedDocument.OCR(MiLANGUAGES.miLANG_ENGLISH, true, true); // On this row exception throws
Thanks.
Mykhailo Kosovan
|
|
|
|
|
We resolve this problem!!!!!!!!!!!!!!!!!!!
We install MS Office 2007 instead of MS Office 2003
All work fine.
|
|
|
|
|
Hi, I'm trying to bind an acccordion control to an access database, but nothing is displayed. I can't seem to find the problem. Plz have a look:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<ajaxToolkit:Accordion ID="MyAccordion" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeader" ContentCssClass="accordionContent" AutoSize=None FadeTransitions="true" TransitionDuration="250" FramesPerSecond="40" Height="38px" Width="51px" >
<Panes></Panes>
<HeaderTemplate><a href="" onclick="return false;"><%#Eval("Client_Name") %></a>
</HeaderTemplate>
<ContentTemplate><%#Eval("Client_Address") %>
</ContentTemplate>
</ajaxToolkit:Accordion>
// The code behind in C#
protected void Page_Load(object sender, EventArgs e)
{
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("ClientsDB.mdb"));
System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand("SELECT * FROM Clients ",conn);
System.Data.OleDb.OleDbDataAdapter adp = new OleDbDataAdapter(cmd);
conn.Open();
System.Data.OleDb.OleDbDataReader dtr = cmd.ExecuteReader();
while (dtr.Read())
{
}
dtr.Close();
DataSet dsClients = new DataSet();
adp.Fill(dsClients, "Clients");
MyAccordion.DataSource = dsClients;
MyAccordion.DataSourceID = "dsClients";
MyAccordion.DataBind();
conn.Close();
}
|
|
|
|
|
I have created a DTS package and program to execute that DTS. It was working fine in my system. While executing in another system, i got error "Execution cancelled by user".
Is there anybody know why it occurs?
--Balaji
|
|
|
|
|
Is this a repeatable error? Does it happen every time or was it a one time occurence?
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
This is certainly kind of a newbie question, but I have a fairly old COM application server, that is used by VB and VC6 source code so far.
Now I would just like to use that app server again, but this time through .NET (C# in this case) since noone wants to keep that old VC/VB IDEs when developing new stuff.
But I cannot find any good tutorial how to start with COM and .NET
Maybe I am just too stupid that I have not found any good article on it... help appreciated.
- Roland
|
|
|
|
|
|
hai,
i am using a dialog based application & i want to store the user defined values & get that values during the next time program is executing
|
|
|
|
|
Use registry to store them and retrieve them in the next instance.
Cheers,
Suresh
|
|
|
|
|
Initialization file, Registry, Serialization, Database,...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi Everyone,
Actually I like to use the GPL MPEG1/2 decoder from the follwing site
http://www.free-codecs.com[^]
I have the decoder source which gives GPLDec.lib and GPLDec.ax files. I had registered the GPLDec.ax file so that I can see that in Graphedit,but can anyone tell me how do I include the GPL MPEG1/2 Decoder in my own graph with the help of the IBaseFilter interface? And also the CLSID mentioned in the source is "CLSID_GpgMpegDecoder" ..When I try to add this with ADDFilterByCLSID(...) function I an getting a "Undefined Symbol" error as there is no header file given to access the GPLDec.lib file. So can anyone help me with this?
Thank You,
With regards
Raja Bose
|
|
|
|
|
Dear all,
Good Day!
I’m writing a windows service(Login with local system) that open a Ms Word document, do some modification and then save the document to a new doc file. I’m using the Microsoft Word 11.0 Object Library (Office 2003) via interlop. It works fine in my XP development PC(VS 2003 , framework v1.1.4322).
However, when deploy it to Windows 2000 Server which have Office 97 installed, the following error message encountered when the system perform Word.Document.Open() function.
'System.NullReferenceException: Object reference not set to an instance of an object.
at Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)
at GCMS.RWrite.WriteReminder(RObject oRem)'
The following is my code snipet:
Dim oMainDoc As Word.Document
Dim oApp As Word.Application
If IsNothing(oApp) Then
oApp = New Word.Application
End If
'Error encounter at this line
oMainDoc = oApp.Documents.Open("c:\Test.Doc", isible:=False, OpenAndRepair:=True, Revert:=True, ReadOnly:=False)
The following file are inside the deployment folder.
MSWORD.OLB
office.dll
stdole.dll
Will the MSWORD.OLB (version office 2003) conflict with the version office 97 at the deployment PC? Can anybody give me some advise
I have done some searching but still not able to find the solution Some have suggested to use DCOMCNFG to fix the user profile problem but since the windows service is login as “System”, it shouldn’t have this problem right?
CCN
|
|
|
|
|
Hi,
Is it possible to share the same instance of a COM between multiple client ?
I try to implement this scenario :
----------------------------------
1 - Create a COM service with and interface ITest that open the RS232 port 3.
2 - Create an application that instance the COM and use ITest interface.
3 - Start the service (1).
4 - Start two different instance of the same application (2).
5 - From this two applications send data to RS232 port 3 using ITest interface...
I don't know if it's possible... If some one have a solution, send me a message
I found a solution to share memory segment from multiple instance of a DLL, but for hardware resource....???
Thanks,
Ps: A made the difference between RS232 COM port and Object COM :->...
...
|
|
|
|
|
I think you can solve the problem making an out-of-process (i.e. an excutable) COM object: this way only a single process (the COM server) will access the hardware resource on behalf of its clients.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks for the answer.
- modif 2 -
Thanks, with singleton design implementation it's perfect...
A++
...
|
|
|
|