Solved

Create Object problem

Posted on 2002-07-30
14
190 Views
Last Modified: 2013-11-13
I have Nt Server and there i run the server side programe  which handles the database read write ( seperate functions). How can i execute those functions in my client computer.

any one with a complete example pls.

Myserver name is KGMSERVER
0
Comment
Question by:ackid32
  • 6
  • 4
  • 2
  • +2
14 Comments
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187765
Maybe look into using WINSOCK
One event using WINSOCK is DataArrival
Get Client side program to send function name to server side program

Have a Select Case staement in your Server side program in the DataArrival event which calls functions

Select Case

 Case "Function1Called"
0
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187770
At the following link there is an example of using WINSOCK for client server apps

http://www.dcs.napier.ac.uk/~bill/vb_winsock.htm
0
 
LVL 4

Expert Comment

by:gencross
ID: 7187774
Is this a COM component(DLL, EXE)?  If so, why not just register the component on the client machine, then you can use the public functions in it.

Please let me know if I am off base, or you need more information.
0
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187776
You can also use DataArrival event in your client program to call those functions on your client computer.
For example I have a server program that talks to a client app on my client computer to give an alert.

The client app in the DataAriival event checks for a certain string like "ServerMalfunction"
and then it calls a function which plays a siren.wav file on my client computer
0
 
LVL 4

Expert Comment

by:Nazdor
ID: 7187884
Sounds like DCOM is going to be more usefull than Winsock - but it depends on where the client/server machines are located.

If on the same lan, go with DCOM (as mention by gencross), if over the internet, then you'll need Winsock.

There's not much point giving more detailed information until ackid32 gives us more information.

0
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187900
Nazdor/gencross
Yes I agree if on same LAN - DCOM is good
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7188137
first you need to get vbr and tlb files for your client pc.
Just compile your activex component with remote files checked.
After that you need to use Clireg32 to register them.
And use createobject(”progid.classid”,”servername”) to access your object
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 5

Expert Comment

by:rkot2000
ID: 7188159
try this sample with all details :

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q161837

p.s you need to send a disconnected recordsets from server to client .

0
 

Author Comment

by:ackid32
ID: 7190029
Gencross,

Yes, how i register the component on the client machine? Please in Detail.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190473
for activex dll you need to run RegSvr32 with path to your dll
like : RegSvr32 c:\winnt\my.dll

for activex exe you need to dbl-click on it.

or you can use setup wizard for this job.



0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190599
p.s you don’t need to register the physical component on a client machine.
You need to register some information about server component on the client pc.


This article details a method that can be used to ensure that your client application correctly traps for and resolves error 429 at run-time if the ActiveX DLL is present on the machine but not correctly registered.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q173407

This article demonstrates how to use the CLIREG32.EXE utility to manually register remote Visual Basic components on the client machine.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q194636
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190604
one more if you have an activex dll you need to use mts or com+ to host it.
0
 
LVL 4

Accepted Solution

by:
gencross earned 300 total points
ID: 7190870
Sorry I did not get back with you, I have been out...

ackid32,

rkot2000 is providing good information, although it is getting a little too complicated.

Register the component on the client machine using regsvr32 as rkot2000 stated above.  This is all that must be done to use the component on the client.

On the server you should use MTS (NT 4.0) or Component Services (Win 2000) to host the component.  This will make life much easier.  To do this in Win 2000 just open Component Services and follow the directions on installing a new package.  This will run the component in a separate process, allowing you to take it in and out of memory, for example if an error occurs in the component the only way to get it out of memory is to reboot the server if you don't use these.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190913
with mts or com+ you can create a client config.exe(application proxy)
this exe can configure client pc to work with your server.

but for activex exe you need to use clireg32
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 50
vb6 connector to mongodb 2 27
Spell Check in VB6 13 45
Re-position the objects 7 50
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This video teaches viewers about errors in exception handling.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now