|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
.NET console application fails lanching it from a COM applicationHi,
I developed a simple console app performing some optimizations and call to DTS packages. When I run the app from console or from Visual Studio everything is OK. When I call the program from a VB6 app, DTS fail with access denied or sql server non existant error. The console program is launched with a CreateProcess call from VB6 app. Someone can help me? Thanks. Have you got a Com callable wrapper for your .NET application ?
--Saurabh Show quote "ElleEmme" <ElleE***@discussions.microsoft.com> wrote in message news:368A0CDD-1E69-4F74-8645-9586064CCAEA@microsoft.com... > Hi, > > I developed a simple console app performing some optimizations and call to > DTS packages. > > When I run the app from console or from Visual Studio everything is OK. > When > I call the program from a VB6 app, DTS fail with access denied or sql > server > non existant error. > > The console program is launched with a CreateProcess call from VB6 app. > > Someone can help me? > > Thanks. The VB6 program is from third parties and I can only specify an executable to
launch. I need a callable wrapper for my .NET console app also in this case? Thanks. Show quote "saurabh" wrote: > Have you got a Com callable wrapper for your .NET application ? > > --Saurabh > "ElleEmme" <ElleE***@discussions.microsoft.com> wrote in message > news:368A0CDD-1E69-4F74-8645-9586064CCAEA@microsoft.com... > > Hi, > > > > I developed a simple console app performing some optimizations and call to > > DTS packages. > > > > When I run the app from console or from Visual Studio everything is OK. > > When > > I call the program from a VB6 app, DTS fail with access denied or sql > > server > > non existant error. > > > > The console program is launched with a CreateProcess call from VB6 app. > > > > Someone can help me? > > > > Thanks. > > > Sorry I did not read it properly, but I am still wondering why you are using
CreateProcess? The way I had done it is define an interface, write an implementation class and in visual studio project setting set the register for com interop to true. This generates the CCW for your class and then you can call the methods defined in the interface from your VB 6 app. I am not sure thought if that will affect the errors you have mentioned. Can you provide more info as to how far the execution goes? Does your application gets launched from VB6 at all? the error you have mentioned might be an issue with sql server running with different account from the one which you are using to launch your exe Show quote "ElleEmme" <ElleE***@discussions.microsoft.com> wrote in message news:368A0CDD-1E69-4F74-8645-9586064CCAEA@microsoft.com... > Hi, > > I developed a simple console app performing some optimizations and call to > DTS packages. > > When I run the app from console or from Visual Studio everything is OK. > When > I call the program from a VB6 app, DTS fail with access denied or sql > server > non existant error. > > The console program is launched with a CreateProcess call from VB6 app. > > Someone can help me? > > Thanks. You're right, but as i wrote in my second message, I haven't the source of
the VB6 app, only I can specify an executable to launch. Credential are fine, also windows identity, I checked them during the execution. But it works standalone, and doesn't work launched from the other program... Show quote :-( "saurabh" wrote: > Sorry I did not read it properly, but I am still wondering why you are using > CreateProcess? The way I had done it is define an interface, write an > implementation class and in visual studio project setting set the register > for com interop to true. This generates the CCW for your class and then you > can call the methods defined in the interface from your VB 6 app. > > I am not sure thought if that will affect the errors you have mentioned. Can > you provide more info as to how far the execution goes? Does your > application gets launched from VB6 at all? the error you have mentioned > might be an issue with sql server running with different account from the > one which you are using to launch your exe > > > > "ElleEmme" <ElleE***@discussions.microsoft.com> wrote in message > news:368A0CDD-1E69-4F74-8645-9586064CCAEA@microsoft.com... > > Hi, > > > > I developed a simple console app performing some optimizations and call to > > DTS packages. > > > > When I run the app from console or from Visual Studio everything is OK. > > When > > I call the program from a VB6 app, DTS fail with access denied or sql > > server > > non existant error. > > > > The console program is launched with a CreateProcess call from VB6 app. > > > > Someone can help me? > > > > Thanks. > > > |
|||||||||||||||||||||||