|
gsvolt wrote: Please help
Not sure what kidn of help you are looking for.
gsvolt wrote: COM developers
I am not sure that there are anymore COM developers. But I once wrote a COM DLL that I used in an MFC desktop application that was also used in a web application if that helps.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
gsvolt wrote: I'm investigating ways in which a COM component is exposed to the world wide web, preferably in IIS 7.
..you're posting a question - there's a difference.
gsvolt wrote: Is this an exercise in futility, or do COM developers frequently write components to be executed in a windows desktop application as well as in a web application?
Though I do use COM-controls (written in .NET), they do not run on the webserver, but in the webbrowser. Meaning it has the same limitations as installed software, which has, obviously, the preference.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
hello every body
i have some dlls writen to communicate with a smart card reader.
there is a problem when i want to add this dlls as a refrence to vb.net. but with vb6 it could be imported an i saw there functions.unfortunately when i call this functions an error pups up "there is no entery point"
i tried to use dllexport app to read out some data about it.
Function Name : DllCanUnloadNow
Filename : SmartRD.dll
Type : Exported Function
==================================================
Function Name : DllGetClassObject
Type : Exported Function
==================================================
Function Name : DllRegisterServer
Type : Exported Function
==================================================
Function Name : IAcs38RD::SCConnect
Type : COM Method
==================================================
Function Name : IAcs38RD::SCDisconnect
Type : COM Method
==================================================
as you see some functions are exported functions an some com objects.what should i do to define an entery point for using this functions?
thanks
|
|
|
|
|
I found the solution.
sometimes some dlls can not be added as a refrence in a .net language but for another is possible.suppose we have a dll that written in vb6.its possible to add it as a refrence in c#.net but there is no way to add it in vb.net.
the solution is that we add dll as a refrence in C#,define a class to determine first dll functions,subs and arguments.
now we have a exported dll that is useable in any .net language.
I can read from smart card but it seems strings was combined with some salt.how can i pull out the pure string from a solution?
|
|
|
|
|
You may need to create and use a system driver, since you are trying to access hardware. Just throwing out a suggestion, that you may need to do.
Simple Thanks and Regards,
Brandon T. H.
Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison
|
|
|
|
|
Hello
With the help of coffee and guesswork I've managed to use COM and Interop to open an Outlook .msg file and extract content from it. I have Outlook 2007 installed and I'm using Microsoft.Office.Interop.Outlook PIA runtime version 2.0.50727 (Version 14.0.0.0)
I'm using .NET 4 in a WPF application.
My problem is that my code starts an Outlook process but does not close it down afterwards. If I am already running Outlook, my code seems to attach to that process rather than start another one and if outlook is already running, my app.Quit() message closes the existing Outlook application (not the process.)
My question is am I going about this in the wrong way? I've read lots of posts about using Outlook but nothing that describes with authority how I should cleanly open, interrogate and close an outlook message.
Here's the code:
public override void ViewContent(string strFilePath)
{
base.ViewContent(strFilePath);
Microsoft.Office.Interop.Outlook.Application app = null;
Microsoft.Office.Interop.Outlook.NameSpace session = null;
Microsoft.Office.Interop.Outlook.MailItem item = null;
try
{
app = new Microsoft.Office.Interop.Outlook.Application();
session = app.Session;
item = session.OpenSharedItem(strFilePath) as Microsoft.Office.Interop.Outlook.MailItem;
if(item != null)
{
Subject = item.Subject;
From = item.SenderName;
if(string.IsNullOrEmpty(item.SenderEmailAddress) == false)
From += "{" + item.SenderEmailAddress + "}";
MessageText = item.Body;
item.Unload += new ItemEvents_10_UnloadEventHandler(item_Unload);
item.Close(OlInspectorClose.olDiscard);
}
app.Quit();
}
catch(Exception)
{
}
finally
{
if(item != null)
System.Runtime.InteropServices.Marshal.ReleaseComObject(item);
if(session != null)
System.Runtime.InteropServices.Marshal.ReleaseComObject(session);
if(app != null)
System.Runtime.InteropServices.Marshal.ReleaseComObject(app);
item = null;
session = null;
app = null;
}
}
Is this the right way to use COM and Interop? Does anyone have any pointers for me or a guide showing best practices? I'm new to COM so if anyone thinks my code is going to leak or use up handles or some other horror please let me know.
Thanks all,
Keith
|
|
|
|
|
So, I had asked the question in the subject itself: Is COM an 'outdated' technology?
If it is, what are the technologies that replace COM? And how?
If it is not, why such an old technology is still there? (I understand the basic design of COM and I understand why it was needed back then.)
I am hoping to see a discussion emerging about this, in the hope that I will be able to learn a lot.
|
|
|
|
|
krumia wrote: I am hoping to see a discussion emerging about this,
This forum is not the place for discussions, it's for technical questions; try the Lounge.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I thought of posting this in the lounge, but all the same this is where most the COM experts gather, I suppose.
I have asked what I felt as a technical question anyway: Is COM an 'outdated' technology?
having asked the technical question in the technical forum, I don't think 'hoping to see a discussion' is a sin. After all, the boundary between question-answer session and discussion is unclear.
Anyway, I will re-post this in the lounge. Thanks for the hint.
|
|
|
|
|
krumia wrote: I have asked what I felt as a technical question anyway: Is COM an 'outdated' technology?
No, you have asked a philosophical question, there is nothing technical about it. You are asking people to give their opinions on something; opinions that will vary widely based on their own assumptions and possibly even prejudices.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Richard MacCutchan wrote: This forum is not the place for discussions
err, umm "Home Articles Quick Answers Discussions Learning Zones Features Help! The Lounge
|
|
|
|
|
OK, let's count the number of people who responded to this call for a discussion here.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
It amazes me how many people attempt to use redirection instead of acknowledging that someone elses point was valid. At this point in time, the tab above for this forum is titled "Discussions". You were wrong. Just admit it. 
|
|
|
|
|
As I said, count how many people actually responded to the request for a discussion. Try answering the question; but first make sure you read How-to-get-an-answer-to-your-question[^].
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
krumia wrote: So, I had asked the question in the subject itself: Is COM an 'outdated' technology?
..it is.
krumia wrote: If it is, what are the technologies that replace COM? And how?
DCOM and more recently, .NET. No, I'm not going to reiterate history, it's out there on the web somewhere.
krumia wrote: If it is not, why such an old technology is still there?
Because having something newer that "replaces X" does not really replace X. Assembly and C++ are still around, as is the Latin language.
krumia wrote: I am hoping to see a discussion emerging about this
Just look up one of the old ones
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hello,
I am now facing a very strange issue.
One of our product installers registers numerous COM dll's during the installation of the product. Subsequently, this creates COM+ applications under Administrative tools --> Component Services --> COM+ applications.
One of the COM+ applications is created during the install to run under NETWORK SERVICE account. However, at times , it has been observed that the identity of this COM+ application is set to interactive. I am using a msi based installer. The windows installer log files clearly state that the COM+ application was set to run under NETWORK SERVICE account.
We use our own custom code to create this COM+ application.
This issue is not reproducible at will. However, it does happen on some environments.
Either of the two things is happening:
i)There is a bug in the installer code which is causing this
ii)There is something outside of install which is causing this.
I need to root cause this behavior.
Reason as to what is causing this.
Upon carrying out some research on the web, i have come across the following two articles:
http://support.microsoft.com/kb/926098
http://blogs.msdn.com/b/distributedservices/archive/2009/06/19/tracing-in-com-and-complus.aspx
These two articles talk about how diagnostic logging can be enabled for COM+ components.
However, i am not really sure if they will be of use to me , as i need to accurately pin point as to what is changing the identity of the COM+ component to INTERACTIVE USER.
The other major disadvantage with this logging is that the .etl files output ,are in a binary format and can only be decoded by contacting Microsoft with the help of so called .tmf files.
Questions:
i)What are the other options available to me to diagnose this issue?
ii)Can i format the .etl files without the help of Microsoft?
iii)Is there any mechanism in place just like process monitor, which could monitor all the events within COM+?
Any help would be very much appreciated.
Thanks,
Kiran Hegde
|
|
|
|
|
Hello,
Can i get some help here.?
Thanks,
Kiran Hegde
|
|
|
|
|
hi experts,
i get a COM server registered (a proxy-stub dll where the interface in), but i don't know the definition of the interface.
is it possible to convert the proxy-stub dll to a COM type library , so i can know the interface ?
or are there other ways to know the interface ?
|
|
|
|
|
Have a look here, and at the following answer <a href="http://www.codeproject.com/Messages/3294656/Re-using-interface.aspx">http://www.codeproject.com/Messages/3294656/Re-using-interface.aspx</a>[<a href="http://www.codeproject.com/Messages/3294656/Re-using-interface.aspx" target="_blank" title="New Window">^</a>]
|
|
|
|
|
If you only want to view the interface definitions, you can use a tool called OLE/COM Object Viewer that comes along with Visual Studio.
From this tool select the menu option File -> View TypeLib... and point to the proxy-stub dll.
But for this to work, the type library has to be packed into the DLL.
|
|
|
|
|
Hey,
in my excel plugin , i have dynamically generated the OLEOBJECTS Textbox ..
when i click on them to write something . THEY opens up the
Private Sub cmdActionTxt0_Change()
End Sub
VBA editor
i do not want it to be opened and simply want to write over them.
How is that possible.
|
|
|
|
|
Hey
I am creating my OWN EXCEL PLUGIN 2010 in vb.net for designing purpose. My requirement is in MY EXCEL sheet i want to select the 1028 By 768 pxiles area for designing .
that area will be calculated automatically on Load of Addin. so that i can start designing in the particular area only.
That are will be filled with WHITE COLOR.
and the selected area of 1028 by 768 pixels can be varied upon my requirement.
please help me as i am new to office tools.
or you can reply me at archanajain@claricetechnologies.com
|
|
|
|
|
Hi,
I have an Excel Addin which loads with Excel Application. Excel Addin then loads a COM dll on the click of Load button.
The loaded COM dll adds an Excel Workbook.
Excel::WorkbookPtr m_ptrDummyWbk;
Excel::WorkbooksPtr ptr_XLWb = m_myExcelPtr->GetWorkbooks();
m_ptrDummyWbk = ptr_XLWb->Add();
m_ptrDummyWbk->PutIsAddin(VARIANT_TRUE);
m_ptrDummyWbk->PutSaved(0,VARIANT_TRUE);
The loaded COM dll is released on the click of Unload button and m_ptrDummyWbk is closed and released.
m_ptrDummyWbk->PutSaved(0,VARIANT_TRUE);
HRESULT hr = m_ptrDummyWbk->Close(VARIANT_FALSE);
m_ptrDummyWbk = NULL
ptr_XLWb = NULL;
Now if i load the COM dll again by clicking the Load Button the application Crashes while adding the workbook
m_ptrDummyWbk = ptr_XLWb->Add();
The error displayed is: Quote: Unhandled exception at 0x2f430f9f in EXCEL.EXE: 0xC0000005: Access violation reading location 0x0b0231b8.
What could be the potential cause of this crash and how to get rid of it?
|
|
|
|
|
I have these 2 lines of code, if I remark them out, my function runs fine, but does not add the data to the metabase key. If I leave them in, I can't unload the Variant Array, and I get a CRT Heap Failure upon exiting the function.
I sort of know what it does, it takes the new array entry and converts the type to VT_DISPATCH, and then copies the CLASS MimeMap into the array's last entry.
I have worked hard to get the complete function to work, and it does, it generates the MimeMap Key, loads the data, but I can't exit the function clean, and call it again.
If I need to post more, let me know.
V_VT(&va.pa[cVariants]) = VT_DISPATCH;
V_DISPATCH(&va.pa[cVariants]) = pME;
++cVariants;
|
|
|
|
|
How many elements does va.pa own.
The heap failure is probably occurring because you're exceeding the bounds of the array when you do ++cVariants .
|
|
|
|