Author Topic: dll vb.net  (Read 3609 times)

ilaiza

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
dll vb.net
« on: June 06, 2005, 01:48:10 am »
hi everybody,
I have already place this question but nobody has given one answer to me, sob  :(  :( :'(  :'( !!!  Therefore i post it  again:

"Hi to everybody,
i have a dll written in visual studio.net and when i register it by regasm.exe... the registration comes carried out correctly but EA give me an error in loading the add-in if the dll is not in the same directory of ea.exe! if i copy the dll in the same directory of ea.exe this error doesn't appear. why? what is the reason? Any suggestion is appreciated.

Sorry for my english...   "

I remember you that the dlls built in .net can't be registered with regSvr32 but with regAsm... so the help guide don't help me!!!  ??? ??? ???

i hope someone can give me a suggestion...
thanx in advance...

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: dll vb.net
« Reply #1 on: June 10, 2005, 01:33:24 pm »
This is because in the .net environment 'regasm' doesn't register the component (dll) as a COM object it actually registers an internal microsoft wrapper that sets up the .net environment and then invokes your dll.  The 'wrapper' first looks for the dll in the GAC (Global Assembly Cache), then in the default application directory (ea.exe) and finally in a location if you specified it using the /codebase switch (regasm <<your dll>> /codebase=<path of dll>).

If you used unsigned code then the only option is to put the dll in the same directory as the application that will invoke it.  Strong names/signed code is required if the assembly will be stored in the GAC or via using the /codebase switch.

Here's the msdn doc link to regasm http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfAssemblyRegistrationToolRegasmexe.asp

Stan.

ilaiza

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: dll vb.net
« Reply #2 on: June 14, 2005, 03:40:09 am »
Many thanks for the reply.... :D