473,804 Members | 3,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create object in Windows service

JJ
LS,

I'm trying to create a windows service that calls a function in a
module. This is the code I use to call the function.

Protected Overrides Sub OnStart(ByVal args() As String)
' ' Add code here to start your service. This method
should set things
' ' in motion so your service can do its work.

Call Set_settings.Se t_Constants()

End Sub

In the fucntion I want to connect to the active SolidWorks session.
This is how I do it.

Module Set_settings

Dim SwApp As SldWorks.SldWor ks '# this can also be 'Dim SwApp As
Object'

Public Function Set_Constants_d efault()

SwApp = CreateObject("S ldworks.applica tion", )
SwApp.Visible = True

End function

End module

When running the service, it cannot connect to SolidWorks. In the
background you can see that the application is being started (if it's
not already running), but then it times out and stops the application.

Can anybody help me with this one??

Kind regards,

JJ

Jan 3 '06 #1
0 960

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

Similar topics

11
1934
by: Mr. B | last post by:
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update. Currently I fire off my application hourly useing the built in XP Scheduler. What I am going to do is to have my application check every minute while it is running as I don't want to have to wait up to a hour for my particular update to happen....
11
1162
by: Mr. B | last post by:
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update. Currently I fire off my application hourly useing the built in XP Scheduler. What I am going to do is to have my application check every minute while it is running as I don't want to have to wait up to a hour for my particular update to happen....
3
1544
by: gerard.mears | last post by:
Hi, I'm a total newbie at VB.NET so please bare with me. I would like to create a simple service that will log all exe and com files that are executed but I don't know where to start. I'm pretty sure I know how to create a Windows Service using VB.NET 2003. However, I am stuck on the next part. When a user runs an application I would like to create a text file that logs the EXE or COM file name that has been executed. The text...
1
14771
by: drk.kumar | last post by:
I have an implementation issue with WMI scripts to check the user machine processor. The implementation is working fine in the local machine (Windows XP operating system). It is throwing script error in the DEV environment (Application deployed in the linux box). Following is the javascript code to detect the processor, function detectProcessor() { var locator = new ActiveXObject
3
1746
by: manuitpro | last post by:
Hi All, I have been using fsockopen() in a function in a class. I am able to pass all the objects in a class to another page except the fsockopen () value. I have put the values of objects from the output print_r() as below main pages Class objects Cisco Object ( => 10.10.1.49 => cisco123 => cisco
0
10568
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
10323
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...
1
10311
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9138
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
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
5516
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
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.