Unable To Load The Type Library For Reference "MSCommLib?
Jun 24, 2010
I have a big problem.I'm starting with Visual Basic (2008) and I get this error when you want to run the program,
Warning 2.Unable to load the type library for reference "MSCommLib.Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) prjRxData
I'm using Visual Basic 2008 Express in Windows XP Home edition. I'm trying to compat a MSAccess database using code. When the program is loaded, the error window shows the following comment: Cannot load type library for reference "ADODB". Library not registered. (Exception from HRESULT: 0x8002891/D (TYPE_E_LIBNOTREGISTERED))
Checked some forum sites and they suggested that some .dll files were corrpurted. I went back to Microsoft and resintalled the Visual Basic 2008 Express package from the Web Site.
When I tried to start my visaul basic program, the error was still in the error list.
All of the sudden, I'm no longer able to build a Solution without getting an error in VS 2010. A minute ago I was able to build, and now I can't.
The error is: Unable to load referenced library 'C:Program FilesReference AssembliesMicrosoftFramework.NETFrameworkv4.0System.DirectoryServices.dll': System Error &H8013110e&
I've checked and the .dll is there. I've re-booted and grabbed the latest version from Team Foundation Server.
I'm compiling a VB.Net 2.0 app (created in VS2008) using msbuild, and now I've added a generic return type, it's giving me the following:
Warning: Type library exporter encountered a generic type instance in a signature. Generic code may not be exported to COM.
Having just spent ages removing all of the previous warnings, I don't really want to add a new one. Any idea how to get rid of it (aside from not using generics)?I don't know what details I'd put in the attribute, or what number to put in the project-level ignore list.
that vb method returns data of type string. i declared result of type string. but it is showing on that vb method like "reference to a non-shared member requires an object reference" How to solve this? Did I make any other mistakes in this code?
I was looking at tutorial that was detailing how to Build a Class Library Component and Consumer Client Application. One of the steps involved was how to add a reference to a library. Am I right in assuming that the reason for adding a reference is to show Vb where class library is located. I would also like to know if it is possible to add the reference within the code. In the tutorial the reference was added via the top menu (selecting project and add reference).
I want to use IWshRuntimeLibrary library to create shortcut icon, i know how to use it within the VS IDE, just add it as reference. My problem is im creating the program on the fly using CSharpCodeProvider. So how do i reference the library in my source code. it will work if i use it from VS IDE, i got some hints on the web and try it ,but it doesnt load the assembly. The line below is what i got from the web but it doesnt work . "DLLFILES" is the folder that i put the IWshRuntimeLibrary.dll AppDomain.CurrentDomain.AppendPrivatePath(Application.StartupPath + \DLLFILES); i put this line the mainusing IWshRuntimeLibrary; //refrence the library,
I just converted a project from 2008 to 2010. I didn't encounter any errors in the conversion.I tried to add HTML Imports System.Threading.Tasks. This gives the "...doesn't contain any public member..." warning and naturally, the .Tasks library is not recognized. Is there any trick to the conversion, setting in the properties, etc. that I need to deal with?Note that I have a "from scratch" project that accesses the System.Threading.Tasks class with no problem. Both projects are contained in the same Projects folder as in:
Whenever i start my form (window application) and link from one form to another, my data doesn't load but when i close the respective form and open it again , it appear. Can i know where is my problem ? Thx in advance. Here's the code snippet :
Private Sub AccessControl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim sqlstring As String = "select * from depttable" Dim connection As New SqlConnection(db.cs) Dim dataadapter As New SqlDataAdapter(sqlstring, connection)
This is strange. I tried to create a new project to reference the Outlook Object Library, but I can't get the code references to work. Here's what I'm doing:
Quote:# Start Microsoft Visual Studio .NET.# On the File menu, point to New, and then click Project.# Click Visual Basic Projects under Project Types, and then click Console Application under Templates. By default, Module1.vb is created.# Add a reference to the Microsoft Outlook 12.0 Object Library. To do this, follow these steps:
1. On the Project menu, click Add Reference. 2. Click the COM tab. 3. Click Microsoft Outlook 12.0 Object Library, and then click Select 4. Click OK. If you are prompted to generate wrappers for the library that you selected, click Yes.
# In the Code window, replace the default code with the following code:
I have a .net class library that works fine. This library has a reference to en external dll. I have converted all its class to comclasses and checked the com interopt checkbox in order to use it as com library. I also registered it with regasm.
i have installed msdn library 2008 sp1. it is shown in the Programms but i cannot locate how and from where it to open. i donot know from where i will open that to use msdn library.
I am implementing IMAPI2 into my vb.net project but ran into a wall. I am getting the message Unable to cast object of type 'IMAPI2FS.FsiStreamClass' to type 'IMAPI2.IStream' when trying to start the burn. I googled around and found this is something that microsoft hasn't fixed.. which basically renders IMAPI2 useless in vb.net.
I found a post on codeproject.com by eric hadden who combined the IMAPI2.dll and IMAPI2fs.dll into an c# interop file. I also see the IBURN interop in microsoft SDK samples. I'd like to use either, but it's in c# and I'm using vb express. Does anyone know a way to get the interop into visual basic or a way around "Unable to cast object of type 'IMAPI2FS.FsiStreamClass' to type 'IMAPI2.IStream'"?
I'm having a problem with converting from one source type to a destination type. I have a form with 2 buttons (button 2 uses the OpenFileDialog to have the user open an excel file set to NewFile),(button 1 takes the contents from specific cells in NewFile and arranges them how I need into oXLApp1).
The error I get is "Unable to cast object of type 'System.IO.FileStream' to type 'Excel.Application'." in line 14 of the code below.
Public Class Form1 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
I'm new to VB 2005, the code below is actualy coded from VB 6 and just converted it to VB 2005. I'm having trouble with line that's on bold letters.In VB 6 this works just ok. By the way the error message is "Unable to cast object of type 'System.String' to type 'ADODB.Connection'." [code]
Unable to cast COM object of type 'System.__ComObject' to class type 'rjsDocMan.Folder'.Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.The code where it is flagging the error is:
I saw this thread and I had simple answer in mind. To use custom enumerator class. So I was trying to make one for that guy, which would have one more property to check whether its has reached end or not. It would also provide current position.I'm getting an error "Unable to cast object of type 'SZArrayEnumerator' to type 'WindowsApplication1.myEnumerator'." at the line 6 [see below].However, return type of values.getEnumerator says its IEnumerator. [code]
Columns 0 & 1 are filled from a DataAdapter from Access Database and three are added. I had this working, but I changed it to check for the column "Feed" so I could add several Locations. At first this worked,but I did someething in perfecting it and it now fails after filling the first row of the datagridview (dgvFdMed).I ran a check and the table LotsTab has 8 rows filled. Column 1 & 2 are strings and the database appears they are fine. The added columns have just been created with no value. My plan is to enter the values and then use the data from the grid.
Private Sub sfillGrid(ByVal Loc As String) Dim i As Integer Dim column As DataGridViewColumn
I have 2 Child forms inside a parent. For example, FrmChild1 contains a "Friend Sub" I wish to call.I would like one of the child forms to call that sub from another child form (we will call it FrmChild2. The following code works, but when it's done going through the "For Each", I get a "Invalid Cast"
' THIS CODE IS IN FrmChild1 For Each mFrmChild2 As FrmChild2 In FrmParent.MdiChildren mFrmChild2.GuestRefresh(False) Next
Error after calls are made:"Unable to cast object of type FrmChild1 to type FrmChild2.
I have a series of API calls that are returning J# data types. I have been able to convert most of the data types (Integer, Boolean, Double, Float, etc) just fine.What I need to do now is convert a java.Util.Collection to a VB .NET collection (ArrayList)
Here is my attempt:
Public Function MakeDotNETCollection(ByVal javaCol As java.util.Collection) As Collection Dim dotNetCol As Collection
[code]....
I keep getting a runtime error "Unable to cast object of type 'AbstractListlistIterator' to type 'System.Collections.IEnumerator.
I am building a software which will be used to create a remote desktop connection. However I'm getting this error:
Unable to cast COM object of type 'System.__ComObject' to interface type 'MSTSCLib.IMsTscNonScriptable'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{C1E6743A-41C1-4A74-832A-0DD06C1C7A0E}' failed due to the following error: Δεν υποστηρίζεται τέτοια διασύνδεση (Exception from HRESULT: 0x80004002 E_NOINTERFACE)).
I am using a background worker and am attempting to use the following code. However I keep getting this error on i "Unable to cast object of type 'ObjectCollection' to type 'System.Array'."
Private Sub btnVerify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVerify.Click myArray = listProxies.Items() BackgroundWorker1.RunWorkerAsync() End Sub
I have given reference to Microsoft HTML in COM (am using VB 2008)
"Unable to cast object of type 'System.Windows.Forms.HtmlElement' to type 'mshtml.IHTMLElement'."
I want to retrieve all the properties like the class name, html id of every object in the web browser. I am getting the above exception when i try to direct cast it.[code]...
So I would like to explain what am I doing before I post the question. I would make a textbox in the form, then I add a Microsoft Speech Object Library reference. Then using Microsoft Speech, I would have the text-to-speech option. In the same class I would add this code:
Okay normally this was easy to do, but now with IE9 Visual Studio 2010 hangs and crashes. The problem seems to be even worse because you can't build an Interop.mshtml.dll to match version 9. I've tried using the VS command prompt with no luck. Allegedly this is how it is done, but there are no known examples that actually work. If anyone has done this with success