|
guygo wrote: what can couse the difference between the senarious.
Weak typing in VB.NET has allowed this to work in some instances, as VB casts it for you ( not necessarily to what you were hoping )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have .net remoting service which is running on .net framework 1.1 and I am trying to write a client application that consumes this service using .net framework 2.0 this time. Until now everything worked fine except one case, when I am trying to access a MemoryStream received from the remoting server.
The definition of the function from server interface is something like this:
MemoryStream GetPicture(some parameters);
When I am calling the function from the server I get back a reference (MemoryStream inherits MarshalByRef), but when I'm trying to access any of its functions nothing seams to work. What I get is a time out exception, but if I go deeper into the inner exceptions everything is caused during the deserialization process when the CLR tries to call some functions of the MemoryStream class (for example CanSeek which is a public property) that it knows are public, but the server don't respond.
The service is developed by a third party and is not possible to ask for a .net 2.0 version, or to add another function to their interface which should return a byte[] instead of MemoryStream, which I think that would be more optimum for perfomance too.
The single solution that I am seeing now is to write a .net 1.1 component which should consume this service and return at its turn something else for the 2.0 application that can be consumed more easily.
Have somebody other idea that could help me out of this situation, to avoid this 1.1 component?
Thank you
|
|
|
|
|
i have a problem concerning the windows service and message queue,
i want to make two services communicate with each other using MSMQ
the problem is that one of these servics is an MFC service and the other
one is .net service, when i normnally used the MSMQ the MFC service cant send messages to the .net service but when i use an MFC windows application
with the same code it sends the message normally
So any suggestions or any other means of communication can be achieved between these two services ?
MiNa
|
|
|
|
|
If a components installed in com+ have to be used in ASP on other machine we do it by exporting proxy to the
ASP machine. Here no code change is made even if the Components are in local(in future) or remote.
But in .NET if a class has to access an assembly in other machine, remoting is used.Here the code has to be changed to
do accept remoting. In future if the remote assembly is brought to local machine, the code has to be changed again.
Is it a drawback or is there any other way to do it.
Thanx in Advance
|
|
|
|
|
Hi
I'm trying to make RichTextBox display other characters than it contains in its buffer (i.e. Text property).
For example I want to display all occurences of 'c' as 'v'..
The first approach is to add a second buffer for keeping the original text, but there's a lot of work to do with implementing edition functions and synchronization beetween this buffer and RichTextBox.Text property.
So I was thinking about a workaround, for example overriding the WndProc to process the text (replace all 'c' with 'v'), launch the PAINT method and then replace the modified text with the original one. Unfortunately I'm unable to access the Lines property of RichTextBox in WndProc function. Furthermore changing the Text property launches some events (for example Text_changed) which also call the Paint function, which apparently leads to paint events loop..
Is there a way to make this work?
Maybe someone could find a better solution to my problem.. I would be very grateful
Some other questions:
- Why is the Lines property read only? Is there a way to change Text in RTB using this property (for example Lines[i].append or Lines[i] := smth)?
- Is there a way to cancel an event that has been already launched and is pending in the event handler's loop?
Best regards and thanks for your help
Peter
|
|
|
|
|
Hi.
I have a question regarding setting printer properties programmatically.
Here's what needs to be done.
I need to set properties of the Ricoh multi-function printer to have default color set to 'black & white' when user logs into the machine (printer is on a network).
The problem I have I don't know if it's possible. If it is, and the program/script can be created I will call it from a batch file, which runs every time user logs in.
Is there anyway I can use .NET languages (or any other) to set Color to 'black & white' by default for that printer. We are trying to eliminate color printing especially when it's not needed.
Thank you.
|
|
|
|
|
It is possible - there is a windows API call (Setprinter) that can be coded to set that setting, but I don't see how you can prevent the user just going to printer settings and switching it back to colour...?
|
|
|
|
|
Users are remotly connected so they can't go to the printer.
Do you have any examples of that API?
I appriciate your respose.
Thank you,
|
|
|
|
|
I have added this to the very latest code of the PrintQueueWatch component - it will be in the new release whenever the project gets updated here[^]
e.g.
Dim MyPrinter As New PrinterQueueWatch.PrinterInformation("HP Laserjet 2")
MyPrinter.Colour = False
|
|
|
|
|
How to generate a Stored Procedure Reporting in Visio.
I tried using the Database Model Diagram, created a Datasource & selected a Stored Procedure.
It showed empty results.
Please let me know what is the use of it?
Jassbond
Persistent Systems, Pune
9890596778
|
|
|
|
|
I want to turn off
computer in my pograming
how i can do this
have a nice day/
|
|
|
|
|
|
Vega02 wrote: Redirecting to C# forum
Why? There is nothing in the C# language that will do this. However there may be stuff in the .NET Framework that might so I'd say this forum is a valid place to put this question.
|
|
|
|
|
Oh... I see - The OP cross posted to the C# forum where you had already answered the question. Why didn't you say that? It looks like you are saying the C# forum was a better place for the question.
|
|
|
|
|
Colin Angus Mackay wrote: Oh... I see - The OP cross posted to the C# forum where you had already answered the question. Why didn't you say that? It looks like you are saying the C# forum was a better place for the question.
No, you're right. I was just trying to redirect all follow-up comments to the other thread in the C# forum to keep them consolidated, but I was working too quickly and didn't clarify that point. Apparently that didn't work out as well as I'd hoped.
|
|
|
|
|
C# code:
System.Diagnostics.Process.Start("ShutDown", "/s");
/s for ShutDown
System.Diagnostics.Process.Start("ShutDown", "/r");
/r for Restart
System.Diagnostics.Process.Start("ShutDown", "/l");
/l for LogOff
Srinivas Jadhav
Mb: 9890596778
|
|
|
|
|
I create an activities for Windows Workflow Foundation, which cannot be serialized. Workflow can begin serialization automatically and therefore I'll get runtime error.
If you know how to prevent automatically serialization of workflow or something else to solve this issue, PLEASE WRITE.
Vorskla.
|
|
|
|
|
hi guys,,, i have a dll based on Pascal sentecnce,, but i want to use this dll in my charp code, how can i do that,, do i need to convert it into c# code syntex related dll , i dont have any idea,,
plz help me
thanks in advance
here it is one example of one of its functiomn which i want to access
LONG PASCAL OpenDoor(LPCSTR DevNo,BYTE CtrNo)
hello
|
|
|
|
|
Hi,
haven't used Pascal so far. Is this library COM enabled? If yes then you can just add a reference to it - Visual Studio will automatically create a managed wrapper for it. Otherwise read about DllImport which might also help.
Robert
|
|
|
|
|
no its not a com enabled library ,,,,
thanks
hello
|
|
|
|
|
Hi guys,
I have built a custom Installaion project for one of my programs. I
have included in it some code that registers the product. This
registration code is in a seperate DLL file which gets executed. The
DLL has got a window form interface with a few options ("Demo",
"Activate", "Exit"). The problem is that if you click "Exit" I get the
following error message:
Could not find file "c:\proramfiles\company name\application
name\applicationname.InstallState".
If I click on the "Activate" Button it takes me through the activation
process sucessfully but upon going back to the installer it pops up the
same error message above.
I hope somebody can help here.
Thanks
|
|
|
|
|
I want to return a System.DateTime object from a method and be called when its value is chagned without keeping a reference to it.
For example
class SomeClass
{
public System.DateTime Field
{
get
{
return new System.DateTime(); //I want to know when the value of this object changes
}
}
}
|
|
|
|
|
System.DateTime just returns the current system time when executed. It does not get asynchronously updated by the system.
Geo
|
|
|
|
|
I think I didnt explain it very well
The DateTime will be populated with a value by the calling code. I want the class that returned the DateTime object to know when that happens.
|
|
|
|
|