473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Confused with serializing an object to a queue

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
1 1210

<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
1
by: Ivo Bronsveld | last post by:
All, I have quite a challenging task ahead of me. I need to write an object model (for code access) based on a schema, which cannot be made into a dataset because of it's complexity. So I...
6
by: Rein Petersen | last post by:
Hi Folks! Here's a strange behaviour: Without a properties SET accessor (see code below), the property will not serialize. public class myObject {
2
by: Tobias Zimmergren | last post by:
Hi, just wondering what serializing really is, and howto use it? Thanks. Tobias __________________________________________________________________ Tobias ICQ#: 55986339 Current ICQ status: +...
1
by: M. D'Costa | last post by:
Hello, I am writing an application in C# and am trying to insert an object into a message queue. The problem is that the object is quite complex with many variables, some of which are not...
1
by: Richard Atkinson | last post by:
I would appreciate help on the Microsoft Message Queue. Basically I would like to Serialize an entire class into a message queue and then reinstantiate the class in another application from the...
4
by: Macca | last post by:
Hi, I've been reading the online documentation for the System.Collections.Queue object on how to implement a threadsafe Queue object. I understand the basics, by using the wrapper returned by...
47
by: Max | last post by:
Due to the behaviour of a particular COM object, I need to ensure that a request for a particular ASP page is finalized before another request for the page is processed. Does IIS have a way to...
5
by: | last post by:
I've got a basic "chat" infrastructure that can send objects across the wire, but I'm running into a few issues with trying to send multiple messages and things behaving differently in debug and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.