|
How to Generate OLE dispatch map functions using class wizard or using any other.
please help.
|
|
|
|
|
Hi all,
Thanx in advance.
|
|
|
|
|
|
1.I am working on win professional xp with regional settings changed to chinese(RPC)
2.I added a custom property in chinese alplabets to a word file from windows explorer.
3.I want to read the Custom Properties of a word file.
4.I got the root storage by StgOpenStorage and finally got the pointer to IPropertyStorage.
5.Now when i read custom property using ReadMultiple, i get invalid characters for the custom Property
6.Note:This happens only for custom properties.
Please let me know the solution of the problem.
Thanks and Regards!
Hands-down one of the best
|
|
|
|
|
Hi, i have an ir receiver connected at serial port. i
want to receive signal at serial port using vb.net. is there any sanple code available or any one who can help me.
Thanks
-Waqas
|
|
|
|
|
This will help[^]
Please do not post same question on multiple forums. Since it's a VB.net question, post only in VB.NET forum.
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.
|
|
|
|
|
The question describes as follows:In CxxActiveXCtrl I declare a member m_dlgMain for a dialog which was produce for display the picture and In CxxActiveXCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) function I wrote "m_dlgMain.Create(IDD_MAINDIALOG,this);",then in the dialog's OnInitDialog() procedure I use IPicture to display the specified picture,the display codes is correct,but can see nothing in the html,while move the codes to the dialog's OnDraw() it works ok,I suppose the dialog doesn't notify the control to erease the background but I've written InvalidRect(TRUE) after display.What's the matter?
|
|
|
|
|
why the Exception Retrieving the COM class factory for component with CLSID failed due to the following error: 80004005. occurs how to resolve this.
|
|
|
|
|
Possibly an exception is being thrown from the class constructor. If you have source code for the component, please check the constructor.
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.
|
|
|
|
|
I have this same problem did you resolve this issue and how I'd appreciate any feedback.
Thanks in advance,
Michael
|
|
|
|
|
Does anyone know tutorial of how to create plugin for Mozilla?(I was thinking activeX but it doesn't support it)
It needs to be in C++ and should be able to read from the registry
Thanks
|
|
|
|
|
XPCOM[^]is what you need to know.
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.
|
|
|
|
|
This should be pretty easy but I'm having so many problems with it.
I'm following someone elses code and cant figure out how he did this.
One of the webmethods returns 3 parameters and it uses a class of somesort to do it. We had to reverse engineer to get the code so its not complete.
[WebMethod]
Public Class1 HelloWorld(int i1, string str1, string str2)
{
try
}
//Code
}
Catch
}
return Class1(1,2,3)
}
{
return Class1(0,0,0)
}
}
How is this possible? Thanks in advance.
|
|
|
|
|
If you declare the class with the Serializable value then ASP.NET will take care of translating it into an XML datatype when it is returned. The added benefit of returning the class, besides returning multiple values, is that the XML elements will have the same name as the fields which in this example are Field1, Field2, and Field3.
<br />
[Serializable]<br />
public class Class1<br />
{<br />
private string _field1;<br />
private string _field2;<br />
private string _field3;<br />
<br />
public Class1()<br />
{<br />
}<br />
<br />
public Class1(string Value1, string Value2, string Value3)<br />
{<br />
this._field1 = Value1;<br />
this._field2 = Value2;<br />
this._field3 = Value3;<br />
}<br />
<br />
public string Field1<br />
{<br />
get { return this._field1; }<br />
set { this._field1 = value; }<br />
}<br />
<br />
public string Field2<br />
{<br />
get { return this._field2; }<br />
set { this._field2 = value; }<br />
}<br />
<br />
public string Field3<br />
{<br />
get { return this._field3; }<br />
set { this._field3 = value; }<br />
}<br />
<br />
}<br />
|
|
|
|
|
The question describes as follows:the embeded system which has a apache service installed, capture picture and sound file from the usb camera.I use the activex control to show the picture and play the sound,how can my control to get the data the apache sent?
|
|
|
|
|
Hi experts,
I have a problem...
I am creating an ActiveX component (my first) and in it I need to call a third party dll from a program. the function works only if the program is active.
So basically: my activeX should just post message to the program to execute one of its functions; if the program is active, should execute the order, if not I will use my ActiveX to tell the user that the application is not active
Thank you in advance for all your comments
Dimkov
|
|
|
|
|
I have created simple ATL project. Using AddClass i have added ATL Control object which has a stock property 'Fillcolor' then finished the wizard. After that i tried to add property by using 'add propery', its creating necessary entries in IDL file but its not creating get and set methods to the implementation file.
why this happens? Please help me.
I also find that if i add stock propery to the ATL Control only the above problem occurs.
|
|
|
|
|
Hi,
Is there someone who knows if it's possible and how to integrate COM in a XBAP wpf application?
I've made a wrapper and when I tried to make an instance to it I 've got an AccesViolationException. In my desktopapplication this exception doesn't occur and everything works well. But when i tried it in a browser and in a mediacenter application, this exception was thrown. I think it has to do with the security of web applications but I'm not sure.
Elke.
|
|
|
|
|
Hello
I have developed a COM server using attributed ATL with VS8. The objects are instantiated and used within a C# .NET Windows Forms application. When shutting down the application not all FinalRelease() methods of all objects can execute completely. I can make this behaviour constant by placing a call to Sleep(5000) at the beginning of the FinalRelease() method, the execution will never reach the next statement.
The debugger says at this point that the lowest frame on the call stack is "[In a sleep, wait or join]" (independently from the additional Sleep() call that is not executed at this time).
I think it is related to the threading model of my COM objects (apartment). Someone (I don't know exactly who) waits an amount of time for my objects to terminate and then forces termination. But I don't want this behaviour! How can I disable that or set the timeout to another value? (I'd prefer INFINITE!)
What is the reason for the described behaviour? How can I solve the problem without adding cleanup functions that are called before any descruction code? (I thought FinalRelease() is actually such a cleanup function )
Best regards
Steve
|
|
|
|
|
I think your problem here is actually in how the .NET Framework uses COM objects.
When you create a COM object in .NET code, the Framework generates something called a Runtime Callable Wrapper. The Framework does not call AddRef on your component every time the .NET code makes a copy of the interface pointer. It only calls Release when it destroys the RCW. Instead, it performs traced references with the garbage collector - if the GC detects there are no outstanding references to the RCW it then marks it for collection.
So what calls Release ? I'm not too sure on this one, but I think the RCW ends up on the finalization queue, and then the finalization thread is responsible for calling Release . Unfortunately, there is a total of one finalizer thread in the system (separate from all the application threads, so you can get cross-threading problems) and it can easily get blocked.
I think what's happening for you is that the finalizer thread isn't being allowed to run to completion on process shutdown.
My personal best practice is to do everything possible to avoid finalization. That means calling Dispose on everything as soon as I've finished with it - the using block in C# (and VB 8.0) can help a lot here. Unfortunately again, the RCW doesn't implement IDisposable and cannot be disposed of in this way.
The only documented way to dispose of a COM object explicitly is to call Marshal.ReleaseComObject . However, this function does not trace references and can prematurely delete an object that is still actually in use, so use it carefully.
It is probably better to add an explicit way of allowing the client to close down the object, rather than relying on FinalRelease .
|
|
|
|
|
Why we need COM? shall we use DLL insted of COM? What is the advantage of using COM?
I know COM makes use of DLL for dynamic linking. But the above question is what ever is possible by COM can also be achive by DLL or not? If not what is the advantge of COM?
Thanks in Advance
Nandu
|
|
|
|
|
You know, I hate it when people post questions like this without reading older messages. Someone asked a short while ago what the difference between COM and a DLL is.
Maybe if you read a little bit more about COM, you'd be able to appreciate the differences. Not all COM components sit inside dinky little DLLs. Some components are full-blown applications (like Excel, for instance), and cannot ever be in-process, and that's even before you start thinking about remoting an interface (oops, sorry, I didn't mean to use remote as a verb!).
Steve S
Developer for hire
|
|
|
|
|
Thanks,
I have searched for the diff between COM and a DLL. But I could not find it in the older messages, can you please provide that URL.
Nandu
|
|
|
|
|
this[^] was what I was thinking of.
Seriously, if you do not understand the difference between a DLL and COM, you need to do much more reading (Inside COM or Essential COM would do for starters). As the other poster has said, COM is a binary standard for cross-language components, and much more.
Lots of the parts of the software provided by Microsoft in the OS (such as the Firewall, Explorer) provide COM interfaces as the API. Granted, many components are implemented as in-process DLLs, but lots more aren't. Sure, for many things COM is perceived as overkill, and a simple DLL with a flat API may well be easier to use. However, taking into account the inter-process and inter-machine capabilities that come almost free with COM (and DCOM), you have a much clearer idea that the simple DLL is just the tip of a very large iceberg.
Really, go find a copy of Essential COM, and you'll understand why your question is not a good one. COM is the glue that allows you to stick multiple components together into a system, among other things.
Steve S
Developer for hire
|
|
|
|
|
COM is a binary standard for interacting software components; COM servers have a lot of advantages with respect to ordinary DLL's (BTW only COM in-process servers are DLL's: local and remote servers are executables). Since COM and ordinary DLL comparison is a rather brad topic, I suggest to you to read a good COM-related book, such as Inside COM or essential COM(I assume you're familiar with standard DLL's and OOP programming).
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.
|
|
|
|