473,386 Members | 1,699 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,386 software developers and data experts.

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.Set_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.SldWorks '# this can also be 'Dim SwApp As
Object'

Public Function Set_Constants_default()

SwApp = CreateObject("Sldworks.application", )
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 938

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

Similar topics

11
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...
11
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...
3
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...
1
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...
3
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.