By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,218 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,218 IT Pros & Developers. It's quick & easy.

Confused with serializing an object to a queue

P: n/a
Greetings:

I was hoping for some advice on an application. Here is what I am
working on:
Basically I have a bigger application that is having a printing
problem making multiple copies of a pdf so I set off to write a
program that can watch a folder using filesystemwatcher. From the
events that this generates I created a class and instantiated an
object that will hold information like full path and last write time.
I want to be able to create some logic that determines the file has
stabilized and then queue the object so a separate thread may be a
windows form timer can dequeue them a do the act of making multiple
copies with a unique name and pass them along to a printer drop
folder.

Is this the right way to think about using an object?
One of the first issues I ran into was trying to enqueue the object I
was doing something like this :
Dim fsw = new filesystemwrite
Dim queue as Queue

Some logic on fsw
queue.enqueue(fsw)

This causes an error.
So even if this worked would you then dequeue it back to a generic
object an then be able to see the private variables.
I have read conflicting information about seralizeing an object and I
guess at this point I am confused as I am trying to create a
collection of objects that can be use by a different process other
then the file system watcher.

Thank you in advance for any advice.
Dan , MCSE/MCSA

Oct 8 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

<fa**********@gmail.comwrote in message
news:11********************@22g2000hsm.googlegroup s.com...
Greetings:

I was hoping for some advice on an application. Here is what I am
working on:
Basically I have a bigger application that is having a printing
problem making multiple copies of a pdf so I set off to write a
program that can watch a folder using filesystemwatcher. From the
events that this generates I created a class and instantiated an
object that will hold information like full path and last write time.
I want to be able to create some logic that determines the file has
stabilized and then queue the object so a separate thread may be a
windows form timer can dequeue them a do the act of making multiple
copies with a unique name and pass them along to a printer drop
folder.

Is this the right way to think about using an object?
One of the first issues I ran into was trying to enqueue the object I
was doing something like this :
Dim fsw = new filesystemwrite
Dim queue as Queue

Some logic on fsw
queue.enqueue(fsw)

This causes an error.
So even if this worked would you then dequeue it back to a generic
object an then be able to see the private variables.
I have read conflicting information about seralizeing an object and I
guess at this point I am confused as I am trying to create a
collection of objects that can be use by a different process other
then the file system watcher.

Thank you in advance for any advice.

A collection of objects must be based on an object. You should look up on
Google on how to make a Strong Type Collection that will hold the objects,
which can be a serialized object or not, but in either case, the object must
be based on the recreation of the object and de-serialized back to an object
in another process. The object with it properties of (gets/sets or
lets/gets pointing to private variables with their data) will hold state.
Oct 8 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.