Sorry if this double posts....I THOUGHT I posted this 2 days ago, but
never saw it show up....
My response is inline below....
>>Scott M.<s-***@nospam.nospam10/13/06 04:54PM >>>
Silly question, but when you deployed this application to its final
location, did you copy the Groupware .dll's and the InterOp .dll's?
Response:
Currently, the final location is still my local machine. I did some
searching and see there are multiple debug and release directories
(I'm assuming setup by VS2005). Here are the contents of those folders
(Project name is GW_troubleshooting):
GW_troubleshooting\bin\Debug>
11/04/2003 11:17 AM 557,108 GWCMB1.dll
10/15/2006 10:07 PM 32,768 GW_troubleshooting.exe
10/15/2006 10:07 PM 65,024 GW_troubleshooting.pdb
09/23/2005 06:56 AM 5,632 GW_troubleshooting.vshost.exe
10/15/2006 10:07 PM 126 GW_troubleshooting.xml
10/13/2006 08:45 AM 155,648 Interop.AdminTypeLibrary.dll
10/13/2006 03:35 PM 688,128 Interop.GroupwareTypeLibrary.dll
GW_troubleshooting\bin\Release>
10/13/2006 03:35 PM 28,672 GW_troubleshooting.exe
10/13/2006 03:35 PM 60,928 GW_troubleshooting.pdb
10/13/2006 03:35 PM 126 GW_troubleshooting.xml
10/13/2006 03:31 PM 155,648 Interop.AdminTypeLibrary.dll
10/13/2006 03:31 PM 688,128 Interop.GroupwareTypeLibrary.dll
GW_troubleshooting\obj\Debug>
10/15/2006 10:07 PM 32,768 GW_troubleshooting.exe
10/13/2006 03:35 PM 180
GW_troubleshooting.Form1.resources
10/15/2006 10:07 PM 65,024 GW_troubleshooting.pdb
10/13/2006 03:35 PM 180
GW_troubleshooting.Resources.resources
10/13/2006 09:08 AM 842
GW_troubleshooting.vbproj.GenerateResource.Cache
10/13/2006 03:35 PM 541
GW_troubleshooting.vbproj.ResolveComReference.cach e
10/15/2006 10:07 PM 126 GW_troubleshooting.xml
10/13/2006 08:45 AM 155,648 Interop.AdminTypeLibrary.dll
10/13/2006 03:35 PM 688,128 Interop.GroupwareTypeLibrary.dll
10/13/2006 10:24 AM <DIR TempPE
GW_troubleshooting\obj\Release>
10/15/2006 09:53 PM 0 build.force
10/13/2006 03:35 PM 28,672 GW_troubleshooting.exe
10/13/2006 03:31 PM 180
GW_troubleshooting.Form1.resources
10/13/2006 03:35 PM 60,928 GW_troubleshooting.pdb
10/13/2006 03:31 PM 180
GW_troubleshooting.Resources.resources
10/13/2006 03:31 PM 842
GW_troubleshooting.vbproj.GenerateResource.Cache
10/13/2006 03:31 PM 541
GW_troubleshooting.vbproj.ResolveComReference.cach e
10/13/2006 03:35 PM 126 GW_troubleshooting.xml
10/13/2006 03:31 PM 155,648 Interop.AdminTypeLibrary.dll
10/13/2006 03:31 PM 688,128 Interop.GroupwareTypeLibrary.dll
10/13/2006 03:24 PM <DIR TempPE
GW_troubleshooting\My Project>
10/13/2006 08:37 AM 1,519 Application.Designer.vb
10/13/2006 08:37 AM 510 Application.myapp
10/13/2006 08:37 AM 1,217 AssemblyInfo.vb
10/13/2006 08:37 AM 2,804 Resources.Designer.vb
09/23/2005 03:27 AM 5,612 Resources.resx
10/13/2006 08:37 AM 3,054 Settings.Designer.vb
09/23/2005 03:27 AM 279 Settings.settings
Honestly, I'm not sure what the different folders are for :-/
Here is my code...
Imports AdminTypeLibrary
Imports GroupwareTypeLibrary
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim PO, Dom As String
Dim objDomain, objDom, objPOs, objPO, objCurPO As Object
Dim objdlists, objdlist
Dim DomPath As String = "T:\GRPWISE\DOMAIN"
PO = "<PO String>"
Dom = "<Domain>"
Try
Dim objAdminSystem As Object
'Dim objAdminSystem As New NovellGroupWareAdmin() - Had
tried that.
objAdminSystem = CreateObject("NovellGroupWareAdmin")
<------------fails here per error, but works when running it in the
VS2005 environment
objDomain = objAdminSystem.Connect("T:\GRPWISE\DOMAIN")
'Connect to Default Domain
objDom = objAdminSystem.ConnectedDomain
'Get the Post Offices collection
objPOs = objDom.PostOffices
'Enumerate the Post Offices on objPOs and populate cbPOs.
For Each objPO In objPOs
objCurPO = objPO
Next
objdlists = objCurPO.distributionlists
For Each objdlist In objdlists
lbGWDlist.Items.Add(objdlist.Name)
Next
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
-----End Code-----
The only thing I can really add to this...is when I look in the
registry and some other searching online....I think I remember reading
that "NovellGroupWareAdmin" is called from GWCMB1.dll. (and I added it
manually to ..."bin\Debug" directory)
here is a screenshot of the references:
http://img.villagephotos.com/p/2004-...references.jpg
Any idea what I'm messing up?
On Oct 13, 4:54 pm, "Scott M." <s...@nospam.nospamwrote:
See responses below:
"Moose" <n...@nospam.comwrote in messagenews:G8VXg.154$uF.148@dukeread12...
Ok...so I'm new to using usenet too....so forgive me if I screw this
posting
to the group up...a simple smack in the right direction and I'll correct
my
mistake...No, your posting is fine, no probelms there. :)
As for the problem...
I *think* I DID import the namespace (but obviously not right? :-)
I Added a reference first to "GroupWare Admin Type library" and when it
still didn't work I added a reference to "GroupWare Type Library"
I've also added two imports statements (in addition to the reference in
the
project)
Imports AdminTypeLibrary
Imports GroupwareTypeLibrary
What I don't understand is why itworksperfectly when I use the little
green arrow inside of VS2005...but when I run the app from the
built/deployed (not sure which is the right word) .exe file itfails.Silly question, but when you deployed this application to its final
location, did you copy the Groupware .dll's and the InterOp .dll's?
You also mentioned we no longer use "CreateObject," after my woes...I'm
all
for using something else :-) what SHOULD I be using?CreateObjectwas how instances of classes were made in the predecessor to
ASP.NET (classic ASP & VBScript).
The correct way to make instances is what I showed you earlier
Dim someVariable As New someClass
Oh...I also added the line that is failing to a Try...Catch....to see if
there was more info and found that I'm getting:
System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgID, String
ServerName) at.....<location info>That's good, but the exception information doesn't tell us much more than we
already knew in this case.
I should also mention...this code was originally written in VS2003...and
converted UP.I don't think this has too much to do with the issue.
I also WAS running both VS2003 and 2005 at the same time and just this
afternoon uninstalled 2003.There is no problem with having both installed at the same time. They each
use different versions of the.NET Framework and both those versions are made
to co-exist simultaneously. The only thing to be carefull about is that
when you open a 2003 project in 2005, it will be automatically converted to
the 2.0 framework and there's no going back after that, so you should make
backups of all your 2003 projects in case you want to preserve that code.
Am I helping or just making this all more confusing?
Hope it's the first!No, we just need to keep digging to find the problem.
"Scott M." <s...@nospam.nospamwrote in message
news:ul**************@TK2MSFTNGP04.phx.gbl...
Well, when you made the reference to the object library, the classes in
that
library are now available to your code, BUT in .NET you won't be able to
call a class without referring to the namespace the class resides in. I
had
assumed you had already imported the namespace, but perhaps you haven't.
You will need to know what the namespace name is that your class is in.
You
can then add an "Imports" statement to your code and then you can make
your
instance as I've shown.
In .NET, we do not use theCreateObjectmethod for object instantition.
"Moose" <dlas...@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegro ups.com...
I tried what you suggested and got:
Type 'NovellGroupWareAdmin' is not defined.
That sounds like it should be an easy thing to fix, but so far I've had
no luck.
Thank you for helping!
On Oct 12, 5:15 pm, "Scott M." <s...@nospam.nospamwrote:
Dim objAdminSystem As New NovellGroupWareAdmin()
instead of
objAdminSystem =CreateObject("NovellGroupWareAdmin")