Click here to Skip to main content
15,891,136 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: How to prevent decompilation of vb.net exe or dll? Pin
Arun Jacob18-Sep-09 2:03
Arun Jacob18-Sep-09 2:03 
AnswerRe: How to prevent decompilation of vb.net exe or dll? Pin
bindasrakesh29-Nov-10 21:59
bindasrakesh29-Nov-10 21:59 
QuestionMOSS Pin
Gunjan pandey17-Sep-09 23:09
Gunjan pandey17-Sep-09 23:09 
AnswerRe: MOSS Pin
Richard MacCutchan17-Sep-09 23:55
mveRichard MacCutchan17-Sep-09 23:55 
AnswerRe: MOSS Pin
Not Active18-Sep-09 1:50
mentorNot Active18-Sep-09 1:50 
Questionhow to pass excel application object to automation object? Pin
SRKSHOME17-Sep-09 20:50
SRKSHOME17-Sep-09 20:50 
AnswerRe: how to pass excel application object to automation object? Pin
Richard MacCutchan17-Sep-09 22:54
mveRichard MacCutchan17-Sep-09 22:54 
QuestionHow to deserialize on top of an existing object? Pin
RichardM117-Sep-09 16:49
RichardM117-Sep-09 16:49 
I am sending objects across the wire, and receive some back.
I can identify if an object was sent and returned, or if it is a new object.
For returned objects, I would like to substitute the original object into the deserialization process in the OnDeserialized method of my framework's base class.
This allows all references to the object that got sent to remain intact, without having to get a new deserialized object and then copy all it's fields onto the old object.
----------------------
Functionally, I add a class above the current base class, with two fields:
Int64 ObjectSerialNumber; always unique.
bool ObjectIsNew; which is set to true on creation, and false when it finishs deserializing (see below).
When objects are serialized, they are stuck in a dictionary hooked to that comms session, hashed by ObjectSerialNumber.
In the base OnDeserialized, I have already deserialized ObjectSerialNumber, and ObjectIsNew, but none of the other fields.
If ObjectIsNew != true, I get the original object from the dictionary and insert it in place of the object that the stream is being deserialized into.
If ObjectIsNew == true, I set ObjectIsNew = false and continue using the one provided by the deserializer.
------------------------
The only fly in the ointment is that "insert it in place of the object" really means:

this = originalObject;

I have not found a way to do this in .NET. Anyone have an idea of how to go about that?
Is there a way into the fields that are hidden in 'this'?
The whole framework is already 'unsafe'.
Thanks
Richard

Silver member by constant and unflinching longevity.

QuestionLinkDemands and FxCop [modified] Pin
Gideon Engelberth17-Sep-09 4:54
Gideon Engelberth17-Sep-09 4:54 
QuestionGetting the current Windows Session user from a different User Domain Pin
Tristan Rhodes16-Sep-09 6:30
Tristan Rhodes16-Sep-09 6:30 
GeneralVS SDK: How to apply additional formatting after (not instead) default colorization. Pin
Sergiy Sakharov16-Sep-09 3:58
Sergiy Sakharov16-Sep-09 3:58 
Questionupzip a folder in vb.net Pin
nicetohaveyou15-Sep-09 21:36
nicetohaveyou15-Sep-09 21:36 
AnswerRe: upzip a folder in vb.net Pin
Eddy Vluggen16-Sep-09 5:16
professionalEddy Vluggen16-Sep-09 5:16 
QuestionWeb Camera settings Pin
Raj Jayaswal15-Sep-09 6:56
Raj Jayaswal15-Sep-09 6:56 
AnswerRe: Web Camera settings Pin
Manas Bhardwaj16-Sep-09 8:45
professionalManas Bhardwaj16-Sep-09 8:45 
QuestionDo Microsoft .NET Certificates Expire ? Pin
Hristiyan15-Sep-09 2:48
Hristiyan15-Sep-09 2:48 
AnswerRe: Do Microsoft .NET Certificates Expire ? Pin
Kevin McFarlane15-Sep-09 3:26
Kevin McFarlane15-Sep-09 3:26 
GeneralRe: Do Microsoft .NET Certificates Expire ? Pin
Not Active15-Sep-09 6:58
mentorNot Active15-Sep-09 6:58 
GeneralRe: Do Microsoft .NET Certificates Expire ? Pin
Kevin McFarlane15-Sep-09 8:01
Kevin McFarlane15-Sep-09 8:01 
GeneralRe: Do Microsoft .NET Certificates Expire ? Pin
Not Active15-Sep-09 9:31
mentorNot Active15-Sep-09 9:31 
GeneralRe: Do Microsoft .NET Certificates Expire ? Pin
Kevin McFarlane15-Sep-09 12:20
Kevin McFarlane15-Sep-09 12:20 
GeneralRe: Do Microsoft .NET Certificates Expire ? Pin
Not Active15-Sep-09 13:22
mentorNot Active15-Sep-09 13:22 
AnswerRe: Do Microsoft .NET Certificates Expire ? Pin
Pete O'Hanlon15-Sep-09 3:57
mvePete O'Hanlon15-Sep-09 3:57 
GeneralRe: Do Microsoft .NET Certificates Expire ? Pin
Hristiyan15-Sep-09 4:32
Hristiyan15-Sep-09 4:32 
GeneralRe: Do Microsoft .NET Certificates Expire ? Pin
Eddy Vluggen15-Sep-09 4:41
professionalEddy Vluggen15-Sep-09 4:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.