473,830 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Existing Components vs. Code-it-yourself?

Greetings,

I don't know about you guys but on many occasions I've asked myself
whether or not someone else has solved a particular programming issue
-- whether or not they developed a clever pattern for doing some task
quite well. This usually leads me to a search on today's greatest
technical tool, The Internet. I indefinitely uncover many potential
code snippets, components, etc. and have to weed through them to find
the best one for my particular circumstance.

Usually, I'll grab ahold of any Microsoft proposed solution first as I
trust them more than unfamiliar, rogue developers. When building
production-level apps it's not easy to trust non-commercial code
especially when it's thousands of lines long. I mean, think about it,
most programmers search the web to find solutions that are quick and
easy to implement. If the solutions we find are difficult to
understand and require us to read through thousands of lines of code
and test them ourselves, the process becomes rather cumbersome.

This leads to "Plan B" many times. Many of us know "Plan B". We grow
weary with trying to understand the component we've downloaded. We've
followed all the instructions and sometimes it just doesn't seem to
work or it just about does everything we need it to do but not
everything. "Plan B" is, of course, when we decide that the easier
solution is indeed to build it ourselves. We trust ourselves and by
the end of the development and testing we know the code better than
anyone. If I'm going to have to spend X hours testing the unfamiliar
code, learning it's intricacies, determining whether it meets my
needs, trudging through oftentimes with frustration, then why does
having to spend the same X hours (maybe X * 125%) seem so daunting?
The answer: it doesn't.

Of course, I'm not suggesting we keep reinventing the wheel. It
certainly makes no sense. I'd rather have access to a reliable
repository of components that 1) are trustworthy, 2) are reliable, and
whose interfaces are 3) quickly and easily learned and understood. I
guess the real culprit here is documentation and presentation.

The documentation needs to be complete and outlined at a high level
(in addition to the very detailed level) so that it can quickly be
absorbed. At least I know that I only want to review about 1 or 2
pages of text in order to determine whether the component will meet my
specific needs and whether it can be painlessly accomplished. There
needs to be sample code making use of the component in many real-world
use cases. Examples are almost always the most useful.

I have to offer kudos to Microsoft in their openess. They offer all
sorts of freebies that could easily be sold commercially. One thing
that immediately comes to mind is their Application Blocks.

I recently reviewed one -- The Updater Application Block -- and it
very well documented. Granted, they could simplify it a bit more by
adding an "Updater Application Block For Dummies" section that makes
is seem almost effortless to meet any of a number of enumerated
real-world examples by offering STEP-BY-STEP EXAMPLES. I'm not saying
that I'm a dummy or that most programmers are, it's just that we
already have to spend so much time during the day in this intense
level of concentration that being able to break out of it periodically
because someone else took the extra efforts to make using their
component intuitively easy to use would be WONDERFUL.

I suppose having a standard format for component documentation and
presentation would be a step in the right direction. Futhermore, a
rating system could accompany the imposed standard to indicate how
well packaged the component was in a number of areas -- documentation,
the number pratical examples available, ease of use per developer
feedback, etc. Now I'm getting a bit too analytical on the whole
topic so I'll stop. Really, I'm just hoping for some good ideas to
making reuse (esp. of open source and other non-commercial components)
an easier process.

Let me give you one real-world example where I had to make the
decision to use a pre-packaged solution that seemed overly complex or
develop my own. REPLICATION. I have a solution that requires that
data be replicated between 60 SQL Server machines. The machines do
not exist on a network so replication had to take place over the
Internet. I spent several days reviewing the SQL Server documentation
regarding replication and let me tell you my friends, it didn't seem
easy to set up. Anyway, my frustration/confusion lead me to develop
my own solution. My solution seemed appealing and the way to go to me
because it rested comfortably in my mind -- that is, I could envision
the whole thing, the steps involved, and how they worked together. I
had a mental grip on it. This is where most reusable components fail.
They don't make it QUICK or EASY for the developer to get a mental
grip on reusing their component.

Here's what I did to implement REPLICATION:
1. All tables have an Identity field for a Primary Key (CustomerID,
LocationID, etc.)
2. All tables have two fields -- DateAdded, DateUpdated -- that hold
obvious date values.
3. All locations running a SQL Server instance we assigned a machine
number (1 for location 1, 2 for location 2, etc.).
4. The machine number was used to assign an identity range to each
table. Machine 1 uses identities in the range of 1000000 to 1999999.
This was easily assigned using "DBCC CHECKIDENT (@TableName, RESEED,
@Seed)".
5. I wrote a replication program that nightly iterates through all
tables looking for records that have either be added or updated (per
the dates) within the last 24 hour period (12am to 11:59:59pm) and
adds them to a dataset. When all of the records have been collected
in this way, I used the DataSet.WriteXm l method to create an XML file
containing all of the latest updates for a particular machine.
6. Those updates are uploaded to a central location that also runs the
same replication program. This program can also read an XML files
into a DataSet. Once the DataSet is restored in memory on the central
location I iterate through each record on each table and attempt to do
a forced INSERT (this requires "SET IDENTITY_INSERT [@TableName] OFF".
If the insert fails (this normally indicates that the given Identity
already exists, exception checking can confirm this), I attempt to
update the record being careful to observe the DateAdded and
DateUpdated values to make sure that I don't accidentally restore an
older version of the record.
7. Eventally after all locations have sent their updates to the
central location and those updates have been processed, the central
location repackages the collective updates in an outgoing file that is
downloaded by each location.

As you can see, my solution is much easier to get you mind to grasp
than the solution offered integrally in SQL Server. There are some
finer points that I omitted, but not many. The most difficult aspect
dealt with the logistics behind making sure that all files were
produced/received in a timely manner.

In any case, this is just one example where reinventing the wheel
seemed the easier way out.

Have any of you run into this dilemma whereby coding it yourself
seemed easier than using a canned solution? Do you have any ideas for
making well-executed components (and patterns) available to the public
in a way that eliminates (or reduces) this difficult decision -- to
reuse or to reinvent?

Mario T. Lanza
Clarity Information Architecture, Inc.
Jul 21 '05 #1
6 2181
Hi Mario,

You are in the same position as most of us. I enjoyed reading your long
discussion on standard documentation, and reusable components.

My personal opinion is that a solution is not a component. Components are
already available for a wide variety of things, and I'm sure that many folks
would create more components if they could find a market for them.

What you needed, in your example, was more comprehensive than a component.
You needed a solution.

But where can you go to find a solution that you can reuse?

Look to the patterns literature for the answer to that question. Patterns
are NOT code snippets. They are well described solutions to common problems
(including your replication problem, by the way).

There are some excellent examples of patterns. Probably the first, and most
seminal, compendium of patterns is the book "Design Patterns - Elements of
Reusable Object Oriented Software" by Gamma, Helm, Johnson, and Vlissides
(affectionately known as the Gang of Four). That book has changed so many
lives that there are folks who consider the discovery of this list of
patterns to be something close to a complete re-education in computer
science.

I'm a little less fanatic about the Gang of Four. The book is not that easy
to read. If I were just starting on learning patterns, I'd start with "An
Introduction to Design Patterns" by Alan Shalloway. Excellent book (new
edition will be out in Fall of 2004). I'd then go to "Enterprise Design
Patterns" by Martin Fowler.

To solve your replication problem, I would have used the Observer pattern,
described in the "Design Patterns" book I mentioned above, or use the
variation called Publish/Subscribe, which is well described in this article:
http://www.devhood.com/tutorials/tut...utorial_id=486

The problem you face is common in EAI (Enterprise Application Integration).
It's been solved many times. In fact, many tools have solutions built in.
A good example would be SonicESB which solves the problem using transactions
and Java Message Queues.

Personally, I'm fond of Biztalk. If you had installed the SQL Notification
component on each server, and placed Biztalk in the middle, with MSMQ 3.0
using SOAP over HTTPS as your transit protocol, you could have done most of
this with very little code.

Good luck, and take a look at the patterns literature. You owe it to
yourself not to reinvent the wheel.

--- Nick Malik
Biztalk Bum
Solutions Architect
"Mario T. Lanza" <ml****@lycos.c om> wrote in message
news:bd******** *************** **@posting.goog le.com...
Greetings,

I don't know about you guys but on many occasions I've asked myself
whether or not someone else has solved a particular programming issue
-- whether or not they developed a clever pattern for doing some task
quite well. This usually leads me to a search on today's greatest
technical tool, The Internet. I indefinitely uncover many potential
code snippets, components, etc. and have to weed through them to find
the best one for my particular circumstance.

Usually, I'll grab ahold of any Microsoft proposed solution first as I
trust them more than unfamiliar, rogue developers. When building
production-level apps it's not easy to trust non-commercial code
especially when it's thousands of lines long. I mean, think about it,
most programmers search the web to find solutions that are quick and
easy to implement. If the solutions we find are difficult to
understand and require us to read through thousands of lines of code
and test them ourselves, the process becomes rather cumbersome.

This leads to "Plan B" many times. Many of us know "Plan B". We grow
weary with trying to understand the component we've downloaded. We've
followed all the instructions and sometimes it just doesn't seem to
work or it just about does everything we need it to do but not
everything. "Plan B" is, of course, when we decide that the easier
solution is indeed to build it ourselves. We trust ourselves and by
the end of the development and testing we know the code better than
anyone. If I'm going to have to spend X hours testing the unfamiliar
code, learning it's intricacies, determining whether it meets my
needs, trudging through oftentimes with frustration, then why does
having to spend the same X hours (maybe X * 125%) seem so daunting?
The answer: it doesn't.

Of course, I'm not suggesting we keep reinventing the wheel. It
certainly makes no sense. I'd rather have access to a reliable
repository of components that 1) are trustworthy, 2) are reliable, and
whose interfaces are 3) quickly and easily learned and understood. I
guess the real culprit here is documentation and presentation.

The documentation needs to be complete and outlined at a high level
(in addition to the very detailed level) so that it can quickly be
absorbed. At least I know that I only want to review about 1 or 2
pages of text in order to determine whether the component will meet my
specific needs and whether it can be painlessly accomplished. There
needs to be sample code making use of the component in many real-world
use cases. Examples are almost always the most useful.

I have to offer kudos to Microsoft in their openess. They offer all
sorts of freebies that could easily be sold commercially. One thing
that immediately comes to mind is their Application Blocks.

I recently reviewed one -- The Updater Application Block -- and it
very well documented. Granted, they could simplify it a bit more by
adding an "Updater Application Block For Dummies" section that makes
is seem almost effortless to meet any of a number of enumerated
real-world examples by offering STEP-BY-STEP EXAMPLES. I'm not saying
that I'm a dummy or that most programmers are, it's just that we
already have to spend so much time during the day in this intense
level of concentration that being able to break out of it periodically
because someone else took the extra efforts to make using their
component intuitively easy to use would be WONDERFUL.

I suppose having a standard format for component documentation and
presentation would be a step in the right direction. Futhermore, a
rating system could accompany the imposed standard to indicate how
well packaged the component was in a number of areas -- documentation,
the number pratical examples available, ease of use per developer
feedback, etc. Now I'm getting a bit too analytical on the whole
topic so I'll stop. Really, I'm just hoping for some good ideas to
making reuse (esp. of open source and other non-commercial components)
an easier process.

Let me give you one real-world example where I had to make the
decision to use a pre-packaged solution that seemed overly complex or
develop my own. REPLICATION. I have a solution that requires that
data be replicated between 60 SQL Server machines. The machines do
not exist on a network so replication had to take place over the
Internet. I spent several days reviewing the SQL Server documentation
regarding replication and let me tell you my friends, it didn't seem
easy to set up. Anyway, my frustration/confusion lead me to develop
my own solution. My solution seemed appealing and the way to go to me
because it rested comfortably in my mind -- that is, I could envision
the whole thing, the steps involved, and how they worked together. I
had a mental grip on it. This is where most reusable components fail.
They don't make it QUICK or EASY for the developer to get a mental
grip on reusing their component.

Here's what I did to implement REPLICATION:
1. All tables have an Identity field for a Primary Key (CustomerID,
LocationID, etc.)
2. All tables have two fields -- DateAdded, DateUpdated -- that hold
obvious date values.
3. All locations running a SQL Server instance we assigned a machine
number (1 for location 1, 2 for location 2, etc.).
4. The machine number was used to assign an identity range to each
table. Machine 1 uses identities in the range of 1000000 to 1999999.
This was easily assigned using "DBCC CHECKIDENT (@TableName, RESEED,
@Seed)".
5. I wrote a replication program that nightly iterates through all
tables looking for records that have either be added or updated (per
the dates) within the last 24 hour period (12am to 11:59:59pm) and
adds them to a dataset. When all of the records have been collected
in this way, I used the DataSet.WriteXm l method to create an XML file
containing all of the latest updates for a particular machine.
6. Those updates are uploaded to a central location that also runs the
same replication program. This program can also read an XML files
into a DataSet. Once the DataSet is restored in memory on the central
location I iterate through each record on each table and attempt to do
a forced INSERT (this requires "SET IDENTITY_INSERT [@TableName] OFF".
If the insert fails (this normally indicates that the given Identity
already exists, exception checking can confirm this), I attempt to
update the record being careful to observe the DateAdded and
DateUpdated values to make sure that I don't accidentally restore an
older version of the record.
7. Eventally after all locations have sent their updates to the
central location and those updates have been processed, the central
location repackages the collective updates in an outgoing file that is
downloaded by each location.

As you can see, my solution is much easier to get you mind to grasp
than the solution offered integrally in SQL Server. There are some
finer points that I omitted, but not many. The most difficult aspect
dealt with the logistics behind making sure that all files were
produced/received in a timely manner.

In any case, this is just one example where reinventing the wheel
seemed the easier way out.

Have any of you run into this dilemma whereby coding it yourself
seemed easier than using a canned solution? Do you have any ideas for
making well-executed components (and patterns) available to the public
in a way that eliminates (or reduces) this difficult decision -- to
reuse or to reinvent?

Mario T. Lanza
Clarity Information Architecture, Inc.

Jul 21 '05 #2

"Mario T. Lanza" <ml****@lycos.c om> wrote in message
news:bd******** *************** **@posting.goog le.com...
Greetings,

I don't know about you guys but on many occasions I've asked myself
whether or not someone else has solved a particular programming issue
-- whether or not they developed a clever pattern for doing some task
quite well. This usually leads me to a search on today's greatest
technical tool, The Internet. I indefinitely uncover many potential
code snippets, components, etc. and have to weed through them to find
the best one for my particular circumstance.


I think most people feel very similar.

It always strikes me as a bit ironic that 10 years ago I was producing
monster C and VB3 programs, fighting against inadequacies in the languages
and dreaming of "reusable components". Now we have some great programming
languages with fantastic features, but whenever I start to write a piece of
code, I feel guilty that I may be re-inventing the wheel so I have to stop
and research current standards, interfaces, frameworks, and components, and
then spend effort learning how to integrate all these complex technologies
into my app.

Don't get me wrong, I'm not advocating reinventing the wheel - there is
already far too much of it that goes on, and that is the reason we have so
many competing frameworks and components anyway.

Ultimately, We have to accept that the science of computer programming must
advance to give our customers the best value for money, so the best
programmers will be those that are most skilled at analyzing the buy/build
trade-off. Inventing new frameworks and architectures from scratch is fun
(that's why so many of them are free), but if it's cheaper to buy something
in, that's what customers will want.

This means the job of programmers will change - hordes of "grunt"
programmers cranking out monstrous systems will be replaced by highly
skilled technical architects evalating and integrating existing
technologies.

Andy
Jul 21 '05 #3
Hi Nick,

I am using a code similar to Mario's as I see.
But my question is more about patterns then about code.

I am using a publishing/subcribing pattern between 2 systems. But it is a 2 way
publishing.
Updates from SystemA are sent to SystemB and vice versa.

I don't find specific info about such a pattern and how to avoid problems when 2
updates are done on the 2 systems "near-simultaneously" on a same object.
This is the picture before :
SystemA :
objectID=0002
attribute1=0007
SystemB :
objectID=0002
attribute1=0007

An update is done on SystemA :
objectID=0002
attribute1=0007 A

another update is done nearly at the same time on SystemB :
objectID=0002
attribute1=0007 B

then an update message is sent to the other system:
SystemA to SystemB:
objectID=0002
attribute1=0007 A

SystemB to SystemA :
objectID=0002
attribute1=0007 B

This is the picture after:
SystemA :
objectID=0002
attribute1=0007 B
SystemB :
objectID=0002
attribute1=0007 A

How could I resolve this?
Perhaps having a master and a slave?
Systems are loosely coupled, and I can't use the DateUpdated from SystemA on
SystemB.

Thank for any idea or link.
Jean

"Nick Malik" <ni*******@hotm ail.nospam.com> wrote in message
news:B6Kyc.6588 $Hg2.5609@attbi _s04...
Hi Mario,

You are in the same position as most of us. I enjoyed reading your long
discussion on standard documentation, and reusable components.

My personal opinion is that a solution is not a component. Components are
already available for a wide variety of things, and I'm sure that many folks
would create more components if they could find a market for them.

What you needed, in your example, was more comprehensive than a component.
You needed a solution.

But where can you go to find a solution that you can reuse?

Look to the patterns literature for the answer to that question. Patterns
are NOT code snippets. They are well described solutions to common problems
(including your replication problem, by the way).

....
Jul 21 '05 #4
Hi Jean,

I assume that your databases must remain in sync? I'd suggest passing all
"update" messages through a single point (collector/distributor) that will
distribute out the updates. That ends up serializing the changes (since a
change comes back to the sender), which gives you one value in all
databases.

So to reiterate your problem:

This is the picture before :
SystemA :
objectID=0002
attribute1=0007

SystemB :
objectID=0002
attribute1=0007

An update is done on SystemA :
objectID=0002
attribute1=0007 A

another update is done nearly at the same time on SystemB :
objectID=0002
attribute1=0007 B

then an update message is sent to the distributor
SystemA to distributor
objectID=0002
attribute1=0007 A

SystemB to distributor
objectID=0002
attribute1=0007 B

Now, the distributor sends out two messages (in the order received):

distributor to SystemA
objectID=0002
attribute1=0007 A
distributor to SystemA
objectID=0002
attribute1=0007 B

distributor to SystemB
objectID=0002
attribute1=0007 A
distributor to SystemB
objectID=0002
attribute1=0007 B
This is the picture after:
SystemA :
objectID=0002
attribute1=0007 B
SystemB :
objectID=0002
attribute1=0007 B

How's that sound?

Note: I didn't put a database at the distributor... I just serialized the
messages. This can be done using a variety of mechanisms. I like using
database tables for holding these values temporarily, but it isn't strictly
necessary.

You can serialize using date-time stamp on the distributor (since it is a
consistent clock). Note that this method allows the LAST CHANGE to survive.
There is a variation that will only allow the FIRST CHANGE to survive and
will discard the last change. Let me know if you are interested in that
variation (this one is simpler).

Hope this helps,
--- Nick

"Jean Gobbe" <go***@guidance .be> wrote in message
news:uX******** ******@TK2MSFTN GP12.phx.gbl...
Hi Nick,

I am using a code similar to Mario's as I see.
But my question is more about patterns then about code.

I am using a publishing/subcribing pattern between 2 systems. But it is a 2 way publishing.
Updates from SystemA are sent to SystemB and vice versa.

I don't find specific info about such a pattern and how to avoid problems when 2 updates are done on the 2 systems "near-simultaneously" on a same object.

<<clipped>>>
Jul 21 '05 #5
Thanks Nick,

I will try this solution today.

"Nick Malik" <ni*******@hotm ail.nospam.com> wrote in message
news:Tatzc.1072 83$Ly.89333@att bi_s01...
Hi Jean,

I assume that your databases must remain in sync? I'd suggest passing all
"update" messages through a single point (collector/distributor) that will
distribute out the updates. That ends up serializing the changes (since a
change comes back to the sender), which gives you one value in all
databases.

So to reiterate your problem:

This is the picture before :
SystemA :
objectID=0002
attribute1=0007

SystemB :
objectID=0002
attribute1=0007

An update is done on SystemA :
objectID=0002
attribute1=0007 A

another update is done nearly at the same time on SystemB :
objectID=0002
attribute1=0007 B

then an update message is sent to the distributor
SystemA to distributor
objectID=0002
attribute1=0007 A

SystemB to distributor
objectID=0002
attribute1=0007 B

Now, the distributor sends out two messages (in the order received):

distributor to SystemA
objectID=0002
attribute1=0007 A
distributor to SystemA
objectID=0002
attribute1=0007 B

distributor to SystemB
objectID=0002
attribute1=0007 A
distributor to SystemB
objectID=0002
attribute1=0007 B
This is the picture after:
SystemA :
objectID=0002
attribute1=0007 B
SystemB :
objectID=0002
attribute1=0007 B

How's that sound?

Note: I didn't put a database at the distributor... I just serialized the
messages. This can be done using a variety of mechanisms. I like using
database tables for holding these values temporarily, but it isn't strictly
necessary.

You can serialize using date-time stamp on the distributor (since it is a
consistent clock). Note that this method allows the LAST CHANGE to survive.
There is a variation that will only allow the FIRST CHANGE to survive and
will discard the last change. Let me know if you are interested in that
variation (this one is simpler).

Hope this helps,
--- Nick

"Jean Gobbe" <go***@guidance .be> wrote in message
news:uX******** ******@TK2MSFTN GP12.phx.gbl...
Hi Nick,

I am using a code similar to Mario's as I see.
But my question is more about patterns then about code.

I am using a publishing/subcribing pattern between 2 systems. But it is a

2 way
publishing.
Updates from SystemA are sent to SystemB and vice versa.

I don't find specific info about such a pattern and how to avoid problems

when 2
updates are done on the 2 systems "near-simultaneously" on a same object.

<<clipped>>>

Jul 21 '05 #6
Nick,
What about your variation that will only allow the FIRST CHANGE to survive ?
(I am not sure we are on the right newsgroup ...)

"Nick Malik" <ni*******@hotm ail.nospam.com> wrote in message
news:Tatzc.1072 83$Ly.89333@att bi_s01...
Hi Jean,

I assume that your databases must remain in sync? I'd suggest passing all
"update" messages through a single point (collector/distributor) that will
distribute out the updates. That ends up serializing the changes (since a
change comes back to the sender), which gives you one value in all
databases.

So to reiterate your problem:

This is the picture before :
SystemA :
objectID=0002
attribute1=0007

SystemB :
objectID=0002
attribute1=0007

An update is done on SystemA :
objectID=0002
attribute1=0007 A

another update is done nearly at the same time on SystemB :
objectID=0002
attribute1=0007 B

then an update message is sent to the distributor
SystemA to distributor
objectID=0002
attribute1=0007 A

SystemB to distributor
objectID=0002
attribute1=0007 B

Now, the distributor sends out two messages (in the order received):

distributor to SystemA
objectID=0002
attribute1=0007 A
distributor to SystemA
objectID=0002
attribute1=0007 B

distributor to SystemB
objectID=0002
attribute1=0007 A
distributor to SystemB
objectID=0002
attribute1=0007 B
This is the picture after:
SystemA :
objectID=0002
attribute1=0007 B
SystemB :
objectID=0002
attribute1=0007 B

How's that sound?

Note: I didn't put a database at the distributor... I just serialized the
messages. This can be done using a variety of mechanisms. I like using
database tables for holding these values temporarily, but it isn't strictly
necessary.

You can serialize using date-time stamp on the distributor (since it is a
consistent clock). Note that this method allows the LAST CHANGE to survive.
There is a variation that will only allow the FIRST CHANGE to survive and
will discard the last change. Let me know if you are interested in that
variation (this one is simpler).

Hope this helps,
--- Nick

Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
8376
by: grutta | last post by:
I am writing a windows service that will recieve notification when a USB Device is insterted into the machine. I have used the RegisterDeviceNotification and the RegisterServiceCtrlHandlerEx with a handler. The handler portion seems to fail indicating that my parameters are invalid. I am getting an error code 126 when i try to register the handler and 28 when i register for event notification. Any ideas as to what the deal is? I am...
19
4827
by: Mark Miller | last post by:
QUESTION: Does anyone know how I can use v2.6 of the MSXML parser with .NET? BACKGROUND: I "Web to Print" process that allows our clients (newspapers) to export their data and pass it thru a custom Xslt stylesheet we have created for their print system. The idea of the whole process for them is they request the export and then they get a text file they can import (copy / paste) into their system with all their styles and layout...
0
1455
by: Nadav | last post by:
Hi, Introduction: **************** I have a collection of COM objects that support a constant interface, the interface is build of a collection of properties, methods and events ( events are implemented as IDispatch connection point ), I am trying to create a .NET assembly that will expose the same interface exposed by the other ( binary ) COM components. The problem: ***************** I have no problem exposing properties and methods...
3
5311
by: scoobydoo | last post by:
Hello, I am trying to implement ICloneable's Clone() function, using Serialization. However, my code causes an exception. I have a class derived from TreeNode called "Node1". In Node1, I have implemented Clone() using serialization. When I call the Clone() function, the following exception is thrown at
0
1873
by: Simon | last post by:
I need call a LoginUser API from MC++ dll, but when I try to call the I have always the same exception: "System.NullReferenceException: Object reference not set to an instance of an object. at LogonUser(String lpszUsername, String lpszDomain, String lpszPassword, Int32 dwLogonType, Int32 dwLogonProvider, IntPtr phToken)" Thanks in advance
1
2755
by: Amedee Van Gasse | last post by:
Hello, Sorry for the crosspost, I think both groups are relevant. How can I create and/or open an OpenWriter and an OpenCalc document from a VB.NET application? According to the OOo documentation, OpenOffice 2.0 supports the Common Language Infrastructure (CLI) for bindings to UNO (Universal Network Objects) components. I can find a lot of documentation on developing
4
2973
by: Praveen Chandra | last post by:
Hi, I just wanted to put down the issue with more detailed information so that you can help us get to the right Microsoft resource for a solution! Here is the problem description... Our intent: Accept the COM or COM+ class name, function-name and input parameter (fixed string parameter) as string inputs and execute(invoke) the function at run time.
5
2286
by: PL | last post by:
I try to find a way to get all the existing objects related to a WinForm... I tried "this.Controls" and "this.components.Components" but I'm not reaching all the existing objects... I need to loop across all objects to verify the content of their "tag" property and modify their "text" or "caption" property depending of the object type and "tag" property value. Thanks.
0
51252
debasisdas
by: debasisdas | last post by:
Here's a simple VB6 code snippet that uses the MSChart control to display Charts in VB6.0. To use this sample, please following steps Create a new project in VB6 Pull down the Project menu and choose Components . Select the checkbox next to Microsoft ChartControl 6.0(OLEDB), Click OK. Add a combobox,one Mschart control and one check box tothe existing form. Paste in the following code tothe code window Private Sub Form_Load() 'Fill the...
0
873
by: Tony Johansson | last post by:
Hello! Here I display all the existing rows in the products table in the database using the TableAdapter fill method to put these rows into the DataTable object. private void quryButton_Click(object sender, EventArgs e) { NorthwindDataSetTableAdapters.ProductsTableAdapter productsTA = new NorthwindDataSetTableAdapters.ProductsTableAdapter();
0
9790
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10770
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10481
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10199
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7741
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5616
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5779
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.