DLL register problem

A

Alan

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);

}

..........
 
G

Guest

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/search?q=dotnet+regasm+No+types+were+registered&qt_s=Search

Alan said:
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
 
A

Alan T

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.
 
G

Guest

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
 
A

Alan T

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top