PC Review


Reply
Thread Tools Rate Thread

DLL register problem

 
 
Alan
Guest
Posts: n/a
 
      28th Jun 2006
I created a DLL and tried to register with regasm.exe but got error:

RegAsm: warning RA0000 : No types were registered.


I check that I got the 'no args constructor', so it should be OK.
But it still gave me this warning.

This is the cutdown version of my class:

using System;

using System.Collections.Generic;

using System.Text;

using System.Data.SqlClient;

using System.Data;

namespace DocumentClassLibrary

{

public class DocumentClassLib

{

private string _ConnectionString;

private SqlConnection _Conn;


public DocumentClassLib()

{

_ConnectionString =
"Provider=SQLOLEDB.1;server=myhost;Trusted_Connection=yes;database=mydb;User
ID=alan;Password=alan";

_Conn = new SqlConnection(_ConnectionString);

}

..........


 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWljaGFlbCBOZW10c2V2?=
Guest
Posts: n/a
 
      28th Jun 2006
Does all dependent componens could be loaded and ComVisibleAttribute are set
correctly?

Did y tried to googling first? there are a lot of answers
http://groups.google.com/groups/sear...ed&qt_s=Search

"Alan" wrote:

> I created a DLL and tried to register with regasm.exe but got error:
>
> RegAsm: warning RA0000 : No types were registered.
>
>
> I check that I got the 'no args constructor', so it should be OK.
> But it still gave me this warning.
>
> This is the cutdown version of my class:
>
> using System;
>
> using System.Collections.Generic;
>
> using System.Text;
>
> using System.Data.SqlClient;
>
> using System.Data;
>
> namespace DocumentClassLibrary
>
> {
>
> public class DocumentClassLib
>
> {
>
> private string _ConnectionString;
>
> private SqlConnection _Conn;
>
>
> public DocumentClassLib()
>
> {
>
> _ConnectionString =
> "Provider=SQLOLEDB.1;server=myhost;Trusted_Connection=yes;database=mydb;User
> ID=alan;Password=alan";
>
> _Conn = new SqlConnection(_ConnectionString);
>
> }

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

 
Reply With Quote
 
Alan T
Guest
Posts: n/a
 
      28th Jun 2006
I can now register the DLL by going to project options, set the Visible to
COM check box.

But the problem now is got a runtime error when creating an object in a
webpage using VBScript.
I tried to create a simple DLL also got the same runtime error.

"Michael Nemtsev" <(E-Mail Removed)> wrote in message
news:3B6CADC5-FEAE-4378-84C6-(E-Mail Removed)...
> Does all dependent componens could be loaded and ComVisibleAttribute are
> set
> correctly?
>
> Did y tried to googling first? there are a lot of answers
> http://groups.google.com/groups/sear...ed&qt_s=Search
>
> "Alan" wrote:
>
>> I created a DLL and tried to register with regasm.exe but got error:
>>
>> RegAsm: warning RA0000 : No types were registered.
>>
>>
>> I check that I got the 'no args constructor', so it should be OK.
>> But it still gave me this warning.
>>
>> This is the cutdown version of my class:
>>
>> using System;
>>
>> using System.Collections.Generic;
>>
>> using System.Text;
>>
>> using System.Data.SqlClient;
>>
>> using System.Data;
>>
>> namespace DocumentClassLibrary
>>
>> {
>>
>> public class DocumentClassLib
>>
>> {
>>
>> private string _ConnectionString;
>>
>> private SqlConnection _Conn;
>>
>>
>> public DocumentClassLib()
>>
>> {
>>
>> _ConnectionString =
>> "Provider=SQLOLEDB.1;server=myhost;Trusted_Connection=yes;database=mydb;User
>> ID=alan;Password=alan";
>>
>> _Conn = new SqlConnection(_ConnectionString);
>>
>> }

> --
> WBR,
> Michael Nemtsev :: blog: http://spaces.msn.com/laflour
>
> "At times one remains faithful to a cause only because its opponents do
> not
> cease to be insipid." (c) Friedrich Nietzsche
>



 
Reply With Quote
 
=?Utf-8?B?TWljaGFlbCBOZW10c2V2?=
Guest
Posts: n/a
 
      29th Jun 2006
Did you create the tlb (tlbexp YouComponent.dll ) which is used by VB to call
your methods?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche




"Alan T" wrote:

> I can now register the DLL by going to project options, set the Visible to
> COM check box.
>
> But the problem now is got a runtime error when creating an object in a
> webpage using VBScript.
> I tried to create a simple DLL also got the same runtime error.
>
> "Michael Nemtsev" <(E-Mail Removed)> wrote in message
> news:3B6CADC5-FEAE-4378-84C6-(E-Mail Removed)...
> > Does all dependent componens could be loaded and ComVisibleAttribute are
> > set
> > correctly?
> >
> > Did y tried to googling first? there are a lot of answers
> > http://groups.google.com/groups/sear...ed&qt_s=Search
> >
> > "Alan" wrote:
> >
> >> I created a DLL and tried to register with regasm.exe but got error:
> >>
> >> RegAsm: warning RA0000 : No types were registered.
> >>
> >>
> >> I check that I got the 'no args constructor', so it should be OK.
> >> But it still gave me this warning.
> >>
> >> This is the cutdown version of my class:
> >>
> >> using System;
> >>
> >> using System.Collections.Generic;
> >>
> >> using System.Text;
> >>
> >> using System.Data.SqlClient;
> >>
> >> using System.Data;
> >>
> >> namespace DocumentClassLibrary
> >>
> >> {
> >>
> >> public class DocumentClassLib
> >>
> >> {
> >>
> >> private string _ConnectionString;
> >>
> >> private SqlConnection _Conn;
> >>
> >>
> >> public DocumentClassLib()
> >>
> >> {
> >>
> >> _ConnectionString =
> >> "Provider=SQLOLEDB.1;server=myhost;Trusted_Connection=yes;database=mydb;User
> >> ID=alan;Password=alan";
> >>
> >> _Conn = new SqlConnection(_ConnectionString);
> >>
> >> }

> > --
> > WBR,
> > Michael Nemtsev :: blog: http://spaces.msn.com/laflour
> >
> > "At times one remains faithful to a cause only because its opponents do
> > not
> > cease to be insipid." (c) Friedrich Nietzsche
> >

>
>
>

 
Reply With Quote
 
Alan T
Guest
Posts: n/a
 
      29th Jun 2006
Ah yes, again now I can create the com object in VBScript.
But again, another problem is I have methods in this DLL which returns
object like DataSet, I got an error like
incorrect call of procedure or argument.

This also happens in methods that require parameters whose type are object,
array..
eg.

public void CalSum(string[] aIntArr)
public DataSet GetEmployeeBatch(int aEmployeeID)

I don't know if it caused by VBScript that does not know about .NET 2.0
class?

"Michael Nemtsev" <(E-Mail Removed)> wrote in message
news:CE1C5E37-42C8-415C-87B8-(E-Mail Removed)...
> Did you create the tlb (tlbexp YouComponent.dll ) which is used by VB to
> call
> your methods?
>
> --
> WBR,
> Michael Nemtsev :: blog: http://spaces.msn.com/laflour
>
> "At times one remains faithful to a cause only because its opponents do
> not
> cease to be insipid." (c) Friedrich Nietzsche
>
>
>
>
> "Alan T" wrote:
>
>> I can now register the DLL by going to project options, set the Visible
>> to
>> COM check box.
>>
>> But the problem now is got a runtime error when creating an object in a
>> webpage using VBScript.
>> I tried to create a simple DLL also got the same runtime error.
>>
>> "Michael Nemtsev" <(E-Mail Removed)> wrote in message
>> news:3B6CADC5-FEAE-4378-84C6-(E-Mail Removed)...
>> > Does all dependent componens could be loaded and ComVisibleAttribute
>> > are
>> > set
>> > correctly?
>> >
>> > Did y tried to googling first? there are a lot of answers
>> > http://groups.google.com/groups/sear...ed&qt_s=Search
>> >
>> > "Alan" wrote:
>> >
>> >> I created a DLL and tried to register with regasm.exe but got error:
>> >>
>> >> RegAsm: warning RA0000 : No types were registered.
>> >>
>> >>
>> >> I check that I got the 'no args constructor', so it should be OK.
>> >> But it still gave me this warning.
>> >>
>> >> This is the cutdown version of my class:
>> >>
>> >> using System;
>> >>
>> >> using System.Collections.Generic;
>> >>
>> >> using System.Text;
>> >>
>> >> using System.Data.SqlClient;
>> >>
>> >> using System.Data;
>> >>
>> >> namespace DocumentClassLibrary
>> >>
>> >> {
>> >>
>> >> public class DocumentClassLib
>> >>
>> >> {
>> >>
>> >> private string _ConnectionString;
>> >>
>> >> private SqlConnection _Conn;
>> >>
>> >>
>> >> public DocumentClassLib()
>> >>
>> >> {
>> >>
>> >> _ConnectionString =
>> >> "Provider=SQLOLEDB.1;server=myhost;Trusted_Connection=yes;database=mydb;User
>> >> ID=alan;Password=alan";
>> >>
>> >> _Conn = new SqlConnection(_ConnectionString);
>> >>
>> >> }
>> > --
>> > WBR,
>> > Michael Nemtsev :: blog: http://spaces.msn.com/laflour
>> >
>> > "At times one remains faithful to a cause only because its opponents do
>> > not
>> > cease to be insipid." (c) Friedrich Nietzsche
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP]Register doesn't allow install-programs to register dll-file =?Utf-8?B?Q29tcGFjdA==?= Windows XP Help 2 3rd Jul 2007 02:00 PM
Register DLL's problem Zapper Windows Vista General Discussion 1 22nd Jun 2006 05:59 PM
Problem installing MSantispyware, register dlls problem Engel Anti-Spyware Installation 0 22nd Apr 2005 06:49 PM
Problem installing MSantispyware, register dlls problem kcmjo@comcast.net Anti-Spyware Installation 0 22nd Apr 2005 06:46 PM
Help! Register Problem Suzie Windows XP Performance 1 6th Mar 2004 05:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:37 PM.