Date: Tue, 4 Mar 2008 12:23:07 -0500
Reply-To: CapCity <CapCity@NOWHERE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: CapCity <CapCity@NOWHERE.COM>
Subject: Re: Dot Net Interop
""Pardee, Roy"" <pardee.r@GHC.ORG> wrote in message
news:8AD8F86B3312F24CB432CEDDA71889F20598791D@ex06.GHCMASTER.GHC.ORG...
> Do you know which COM dll's your interop assemblies are hitting? Are
> they in the expected place on all machines, and registered w/regsvr32?
>
Since it once worked on the machine, I would think this is all OK
> I'd try manually removing and re-establishing the reference in visual
> studio & see if that has any effect.
>
I tried this, no effect.
> FWIW--I've done a similar thing w/vb.net (1.1) but I shelled out to the
> sas.exe rather than using COM. I can probably dig that code up if it'd
> be of use...
>
> HTH,
>
> -Roy
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> CapCity
> Sent: Monday, March 03, 2008 10:55 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Dot Net Interop
>
> I tried on a dot net interop news group with little luck. Googling was
> even less luck.
>
> Here's the situation:
>
> We have a dot net (2.0) C# application that takes some user input, does
> some substitution to template text (SAS source code) and executes it.
> Worked like a champ. It used two DLLs that someone obviously created
> interop assemblies for. The names are "Interop.SAS.dll" and
> "Interop.SASWorkspaceManager.dll"
> though I realize the names could have been anything.
>
> Recently an install package needed to be created for this app. I created
> one and decided to test the install on my machine, which is the
> development machine. It installed, but I received an error when it tried
> to execute the
> SAS: "Retrieving the COM class factory for component with CLSID
> {6964D000-4E64-11D2-B94D-00C04F81BC00} failed due to the following
> error:
> 80040154."
>
> I then went back to Visual Studio and ran it and now it didn't work
> there.
> Always did before. I uninstalled the application but it still would not
> work in Visual Studio. Something "global" obviously happened.
>
> I was able to determine that there were no issues accessing the SAS.dll,
> it's the SASWorkspaceManager.dll. Checking the registry (CLSID section)
> shows that the SASWorkspaceManager.dll is put in there by the install
> (and removed by the uninstall) but the CLSID for SAS.dll is there even
> after the uninstall, leading me to believe it was in there all along.
>
> I decided to try to recreate the interop assemblies. The SAS site has a
> page on this. It has two examples for creating interop assemblies using
> tlbimp.exe. The first one (SAS.tlb) generates an error for me (unable to
> load com object) while the second one, for the SAS object manager
> (SASOMan.dll) worked. I set a reference to that in my dot net project,
> but it does not have the same objects/methods we used with the
> WorkspaceManager.dll.
>
> The SAS site also has some code examples, but none wuite match up with
> what we are doing. It also does not mention which com objects are used
> in the examples.
>
> I cannot locate the person who created these two interop assemblies and
> I don't know how to determine which com objectes there were created
> from.
>
> Has anyone had any success with this type of thing? Basically, we have a
> file that is a template of a SAS program. We read it in, make some
> substitutions and execute it.
>
> Thanks in advance.
|