Click to See Complete Forum and Search --> : Passing complex types to methods of queued component


reena_pramodh
April 23rd, 2003, 03:25 AM
I am trying to pass an object of a class to a method in Queued component. I tried doing this first by making use of XmlSerializer. It worked out fine. Currently I am trying to achieve the same by implementing the IPersistStream interface in my class. Also I am allowing unsafe code blocks in my code as I am making use of IPersistStream interface.
When I try to register this queued component using the regsvcs utility I get a warning which is of the following format:

Type library exporter warning processing 'QCTest.IPersistStream.Load(pStm), QCTe
st'. Warning: Type library exporter could not find the type library for System.
Runtime.InteropServices.UCOMIStream. IUnknown was substituted for the interface

Also my client application is not able to execute. Can anyone please tell me what the problem is?
:(

pareshgh
April 23rd, 2003, 05:05 PM
hi,
Question here is does your Queue component tries to fetch some run time dlls.?

have you used "BinaryFormatter"
in your app. (but it has nothing to do with above Q.)

check the following article,
http://www.developer.com/tech/article.php/620091




When I try to register this queued component using the regsvcs utility I get a warning which is of the following format

What type of COM Component is ? what type of typelibrary. What type of Threading Model you are using ?


what type of client application you have ? is it I.E based. I mean to say is does Internet explorer is trying to call
IPersistStream::Load() on the stored xml
document ???

thanks
-Paresh

reena_pramodh
April 23rd, 2003, 11:27 PM
Hi,
Firstly I have developed the queued component in C#. My queued component is not fetching any runtime dlls nor is it using the BinaryFormatter. I have a class Sample that implements the IPersistStream interface so that an object of the class can be passed to the queued component. i.e.

public class Sample:IPersistStream
{
public string str_message;
}
I have a method in my queued component that takes an object of Sample as its parameter.

[InterfaceQueuing]
public interace IMyQueue
{
void displayMessage(Sample obj);
}

public class MyQueue: ServicedComponent, IMyQueue
{
void displayMessage(Sample obj)
{
MessageBox.Show(obj.str_message, "Message shown");
}
}

This queued component when I try to register after compilation gives me the warning that I mentioned earlier. The client application that I am using is a simple C# console application.