|
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++
...
|
|
|
|
|
I can't use Word.Application ... in VS 2005. What is the problem here? I've installed Tools for Office
|
|
|
|
|
Hi,
It's not the same problem, and my problem was solved.
But i can help you... I don't use "Tools for Office" to access Word, i use typelib with MFC wrapper or #import command.
1) To use Word typelib, word must be installed on you machine ^_^
2) You can connect to word from different way.
3) There a lot of good article on this this with Excel try one, and replace Excel.Application by Word.Application and remove Excel specific code...
If you can't solve your problem, send me an other message, actually my VC is dead, i need to install VC2005 in the next hours...
Bye...
...
|
|
|
|
|
i wanna customize webbrowser in my own ocx(mfc activex),
according to Sumit Kapoor's method(plz see,
Customize Web Browser ActiveX and change its inbuilt settings[^]
i add
CCustomOccManager *pMgr = new CCustomOccManager;
m_pDispOM = new CImpIDispatch;
AfxEnableControlContainer(pMgr); into ocx's InitInstance, and implement the IDropTarget interface,now i want to do something in Drop() function,i wanna get the point of the main ocx ctrl through AfxGetMainWnd(), ,of course i got the point,and could get the member webbrowser which had been capsulated in the ocx control,hereto,everything is ok,then i call the webbrowser's method through formmer point,(eg
CMyCtrl* pWnd = (CMyCtrl*)AfxGetMainWnd();
pWnd->m_ctrlWeb.Image(strImage);
),
here problem comes,
if (S_OK == m_pCmdTarg->QueryStatus(&CGID_MSHTML, 1, &ocmd, NULL))
return ocmd.cmdf;,
and error msg is:
First-chance exception in ViewTest.exe (MyControl.OCX): 0xC0000005: Access Violation.
what is the meaning? help!?
thanks!
-- modified at 6:41 Friday 18th May, 2007
|
|
|
|
|
XPointer wrote: First-chance exception in ViewTest.exe (MyControl.OCX): 0xC0000005: Access Violation.
what is the meaning? help!?
It means, either m_pCmdTarg or ocmd or CGID_MSHTML is uninitialized , when it is expected otherwise.
Prasad
MS MVP - VC++
|
|
|
|
|
thanks your reply,
i debug my code again,the variables u referred before are all ininitialized,
i suspect that whether i could use AfxGetMainWnd() in my ocx
|
|
|
|
|
XPointer wrote: suspect that whether i could use AfxGetMainWnd() in my ocx
Don't think so. Probably, you can use some other function , usual MFC function on that returned window pointer, to check it's sanity.
Prasad
MS MVP - VC++
|
|
|
|
|
thanks prasad,
without using AfxGetMainWnd(), which other function could i use,
btw, i have no choice but using globle point to webbrowser instead?
any good idea about this?
|
|
|
|
|