|
What version of Visual Studio was used to create this .DLL?? You're probably missing installing the updated runtimes that the .DLL uses to get this to work. Look in the C:\Program Files\Microsoft Visual Studio version\VC\redist\x86 folder for all the available runtimes. Pick the one that describes what you used to create the .DLL. At a minimum, you'll need to copy the .CRT .dll's to the target machine's Windows\System32 folder.
|
|
|
|
|
Thanks for the suggestion. The development version I am using is Visual Studio 2005 (Also comes up as Visual Studio 8). I tried two different things to try and solve the problem. When I created the install for the program I attached the prerequisite "Visual C++ Runtime Libraries (x86)". So the setup installs the runtime libraries first. This did not solve the problem. Second thing I did was what I think you told me to do. I copied the files from the C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\ folder to the target machine's Windows\System32 folder. This did not solve the problem either. There are other folders in the x86 folder: Microsoft.VC80.ATL, Microsoft.VC80.MFC, Microsoft.VC80.MFCLOC, Microsoft.VC80.OPENMP. Should I try copying the dlls from any of these folders as well? Thanks for the help.
|
|
|
|
|
Member 4084928 wrote: There are other folders in the x86 folder: Microsoft.VC80.ATL, Microsoft.VC80.MFC, Microsoft.VC80.MFCLOC, Microsoft.VC80.OPENMP. Should I try copying the dlls from any of these folders as well?
Only if your DLL is using MFC, ATL, or the OpenMP libraries, which I seriously doubt.
In this case, I have no idea. The HRESULT you got usually means that the code you're attempting to run depends on code found in other DLL's, but those dependant DLL's cannot be found, or cannot be loaded for some reason. The missing runtimes is usually the cause of this problem. But, it appears that your DLL is dependant on other DLL's, but you haven't supplied any information on what other libraries your DLL uses.
Other possibilities include the users permissions to the DLL's being loaded, code access security problems, incorrect .config file for the app loading the DLL's, the version of the .NET Framework you developed against is not installed on the target machine, ..., ..., ...
This question would be better asked in the Visual C++ forums.
|
|
|
|
|
OK. I'll try the Visual C++ forums.
Thanks a lot for your time and help.
|
|
|
|
|
I would like to knoe hos to create a file dll and how i can do a reference in an aplication with it´s. thanks.
|
|
|
|
|
ra_shieru wrote: I would like to knoe hos to create a file dll
You create one of the Class Library or Control Library projects.
ra_shieru wrote: how i can do a reference in an aplication with it
This takes considerably more planning as you would have to expose your classes, methods, and events to COM.
Google for "exposing .NET components to COM" for more information. You've got a lot of reading to do.
|
|
|
|
|
Hi I am trying to add a simple function to a COM class in VB.NET with an Optional Array but get an compiler error.
As soon as I add
Public Sub test(ByVal a As Double, Optional ByRef b() As Double = Nothing)
End Sub
I get following error message.
Error 3 The assembly "C:\gui\LCMFinEngLib\LCMQuant01 v3.003.08.dll" could not be converted to a type library. Type library exporter encountered an error while processing 'LCMQuant01.ComClass1+_ComClass1.test(b), LCMQuant01 v3.003.08'. Error: Type mismatch.
When I remove the Optional Statement it compiles without problems. when I define it as a Private function it compiles as well. Are optional arrays not possible in Com classes?
Hope someone can help
|
|
|
|
|
Optional parameters are legal in a COM class. It works for me in a small test project. But, you'll run into a bigger problem when you try an call this method from a COM Client, like ASP, VBA, or VBScript.
Read this[^]. You'll have to expose the parameter as an Object, not a Double() array.
|
|
|
|
|
I need to convert a string to a DataGridViewCell. I tried
" CType(StringHere, DataGridViewCell) " but that does not work. If anybody know anything about this, please reply as this is extremely urgent. Thanks!
<br />
Dim iColIndex As Integer = dsTemp.Tables("GridCellCaption").Rows(iGridColRowCnt).Item("ColNo")<br />
<br />
Dim iRowIndex As Integer = dsTemp.Tables("GridCellCaption").Rows(iGridColRowCnt).Item("RowNo")<br />
<br />
Dim instance As DataGridViewCell = dsTemp.Tables("GridCellCaption").Rows(iGridColRowCnt).Item("Value") ' Here raising exception <br />
<br />
CType(ctr, DataGridView).Item(iColIndex, iRowIndex) = instance
I searched in net no result ....
<br />
Unable to cast object of type 'System.String' to type 'System.Windows.Forms.DataGridViewCell'.
Thanks & Regards,
DVSriram
|
|
|
|
|
For the second time, you cannot convert a String to a DataGridViewCell object.
The code, as you've written it, doesn't say what you want to do with the DataGridViewCell or the String you're trying to convert. It LOOKS like you're trying to put the string INTO a DataGridViewCell, but which one? You don't have any code referencing any existing DGVC.
|
|
|
|
|
Thanks For reply ,
I got the required result in easy way
Thanks
Sriram
|
|
|
|
|
Great! Too bad you never described what that result was supposed to be... Maybe next time.
|
|
|
|
|
Dim instance As DataGridViewCell = CType(ctr, DataGridView).Item(iColIndex, iRowIndex)
instance.Value = dsTemp.Tables("GridCellCaption").Rows(iGridColRowCnt).Item("Value")
Its Working ............
Thanks Dave , Now i can save and retrieve the datagridview from/to xml
vds
|
|
|
|
|
dvsriram wrote: Now i can save and retrieve the datagridview from/to xml
So that's what you were trying to do??
That's easy to do if your data is in a DataTable and you bound the DGV to it. All you would have to do is call the DataTable's WriteXml method. Done.
|
|
|
|
|
I am facing problems to update combo box value that is binding to a datasource ... i m using VB.NET 2005 and SQL SERVER 2000 at back.
I simply created a Data Source. And added 'PurchaseOrders' Table in it. Set it to draw 'DETAILS' components. and dragged it on to the form and it draws all the controls on the form. along with a navigator and binding source, dataset added to the form.
Now i have a field ... SUPPLIER ID and its component was set to a COMBOBOX.
I seprately loaded this combobox with a datasource as:
SupplierIDCombobox.Datasource = DsSupplier.Tables(0)
SupplierIDCombobox.DisplayMember = "SupplierName"
SupplierIDCombobox.ValueMember = SupplierID
now when i run the program, the first SupplierID is picked by the combobox correctly.
When i navigate to second purchase Order. the supplierID does not change.
How to fix this problem??? anyone?
:- Rashid Ali -:
|
|
|
|
|
OK. There's a few things you have to do.
First, you need a second BindingSource and set it's DataSource and DataMember properties to the table that's going to supply the ID's and Text for the ComboBox to show. It helps greatly if the DataSet you're using has both the table that you're already showing and the table that's supplying the data for the ComboBox. There's normally a one-to-many relationship between these two tables.
The DataSource property of the ComboBox needs to be set to the BindingSource you just created. Also set it's DisplayMember to the field that's supplying the Text the user gets to see in the Combo and set the ValueMember property to the field that's supplying the ID's for those text items.
Then, create a new Binding object and add it to the DataBindings property of the ComboBox. This binding needs to bind the SelectedValue property of the ComboBox to the original BindingSource you already have on the form and the name of the field in that bindingsource that's going to hold the value selected in the ComboBox.
|
|
|
|
|
.
.
.
you need a second BindingSource and set it's DataSource and DataMember properties to the table that's going to supply the ID's and Text for the ComboBox to show.
I wrote code manually to get get ID and Name fields from database. here is the code.
Private Sub LoadSuppliers()<br />
<br />
m_CommandSupplier = New SqlCommand<br />
m_CommandSupplier.CommandText = "Select SupplierId, SupplierName from Suppliers"<br />
<br />
Try<br />
m_DaSupplier = New SqlDataAdapter<br />
m_DaSupplier.SelectCommand = m_CommandSupplier<br />
<br />
m_DaSupplier.SelectCommand.Connection = m_ConnectionSupplier<br />
<br />
m_DsSupplier = New DataSet()<br />
m_DaSupplier.Fill(m_DsSupplier)<br />
<br />
Catch ex As Exception<br />
<br />
MsgBox(ex.ToString, MsgBoxStyle.Critical, " Get Suppliers")<br />
<br />
End Try<br />
<br />
m_DsSupplier.Tables(0).TableName = "Suppliers"<br />
<br />
1 - it's DisplayMember to the field that's supplying the Text the user gets to see in the Combo and set the ValueMember property to the field that's supplying the ID's for those text items.<br />
<br />
2 - create a new Binding object and add it to the DataBindings property of the ComboBox<br />
<br />
Both these task are accomplished in the following code, SupplierNAme is set as Display MEmber , while the SupplierID is set a value member.<br />
<br />
With SupplierIDComboBox<br />
.DataSource = mDsSupplier.Tables("Suppliers")<br />
.DisplayMember = "SupplierName"<br />
.ValueMember = "SupplierId"<br />
.DataBindings.Clear()<br />
.DataBindings.Add("SelectedValue", PurchaseOrderDetailsDataSet.PurchaseOrders, "SupplierId")<br />
<br />
End With<br />
<br />
<br />
End Sub
the table that's supplying the data for the ComboBox. There's normally a one-to-many relationship between these two tables.
The Table that supply the value for both tables is actually a Binding Source with a binding navigator to move back and forth. All these were automatically drawn when i dragged the 'PurchaseOrder' Table from Datasources window.
Note: 'PurchaseOrder' table was set to draw control in 'DETAILS mode' while "PurchaseOrderDetails" table was set to 'DAtagridview mode'.
Now when i run the program, the value for PurchaseOrder and PurchaseOrderDetails tables in both Details and datagrid goes fine.
But when i click 'MOVE NEXT RECORD' button from BINDING NAVIGATOR. All the values in Textboxes and DATAGRIDVIEW changes accurately. But the values in comboboxes like SUPPLIER ID does not change. and it stick to the value that was loaded with FIRST RECORD. What should i do?
:- Rashid Ali -:
|
|
|
|
|
Hello all,
I search an sample on how to create a vpn connection in vb.net
i have found some codes in c# or VisualC ... but i not able to translate it correctly.
Someone can help me ?
Thanks a lot.
|
|
|
|
|
Post the C# code or a link to it and the code you've written. Noone is just going to write the code to do this for you. You have to show an effort on your part before anyone is going to help you with this.
|
|
|
|
|
My main report has a sub report that has a table in it with an associated dataset. When I run the report, the main data displays, but the area that is supposed to show the sub report shows "sub report could not be shown"
Please tell me step by step create sub report with report viewer in vb.net
please help me, its urgent
Thanks
|
|
|
|
|
It's probably saying this because you either don't have any records for the sub report, the data tables you're using don't have any relationship between them, or the subreport isn't configured properly.
Describing all of this would take up a few articles. There's no way anyone is going to do this in a forum post.
...and noone cares how "urgent" it is when you're not paying for support.
|
|
|
|
|
how can i hide the Start Button in Vista using VB.NET2005??
Please give me a code!!!!
from japan(sorry for bad English)
|
|
|
|
|
|
thank you your reply.
im upgrading the application from XP to Vista.
my program fails to hide and disable startbutton in Vista..
the link is really helpful for me!!!!
i could make startbutton disable with using API EnableWindow.
i've tried using showwindow,SW_HIDE and its only made startbutton smaller.
my client said it is okay only disable startbutton not hide.
i really appreciated your answer!!!!
|
|
|
|
|
hello guys!
I know this question might sound a litle stupid but this my first application and things are still confused for me.I'm developing a data centric application in VB.NET with Visual Studio 2005 that is supposed to connect to sql server installed on the machine or in the network.
For exemple in my application project i use the data adapter to connect to the database X with my settings (i mean my user name and password of the sql server on my machine or integrated security) in the connection string on every windowsforms.
Then i wanted a way to deploy my application that will create my database during the installation.I liked one of the msdn ways that use the installer class to read an sql file.But i was more interrested by the method used by
Mukund PUJARI in his article "create a database during installation version 2".My anxiety is this:if the end user has the freedom to choose the database Y and his location, then my application will definitively not be connected to the database end since my connectionstring is different connection to a database X.
In my point of there should be a method that can put in the connectionstring the data provided by the end user.I don't have any idea.Even though i knew and then using data adapters and datasets stuffs how can i make them use it?Supposing i kew it too,it would be then after deployement that i can test that my application is using the database name that i provided during installation.
All this are confusing me and if somebody can just help it would make a programmer have a litle more knowledge
thanks
eager to learn
|
|
|
|