|
You have a dll, or not ? A h and a lib is useless to you in this instance. You'd have to write C++/CLI code that imports those files and exposes a managed class.
If you have a dll, you can't add a reference, that's for COM only.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I copied the SPOEM.DLL to my System32 directory,
It now finds the DLL, but it cannot locate the designated
Entry Point.
One of the function calls is SPOEM.USBCommunication(). When
I call this is says:
Unable to find an entry point named 'USBCommunication' in DLL 'Spoem'
ANy suggestions at this point???
|
|
|
|
|
Perhaps the DLL is not exporting it properly. But, if it can be called from C++, it would be usable with p/invoke.
You should NEVER copy stuff to System32. Just put it in the directory with the exe.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Im am stuck right now.
The example code that they give you with this is indeed a C++ 6.0
MFC wizard application.
They company supplys the .H, .LIB, and the .dll files.
The example just shows those original #DEFINE statements, and there
is the exported class for the DLL. I am trying to make the DLL wotk in
VB.NET. I am not sure why I am getting an:
Unable to find an entry point named 'USBCommunication' in DLL 'Spoem.Dll'.
If I am understanding you at this point. I do not use the .H or the .LIB.
I should only use the
|
|
|
|
|
Did you look into how to do pinvoke in VB.NET ? I have no idea, but I'm pretty sure none of your code has tried it, as none has specified the dll name, that I can recall seeing.
Here is an example I found online:
Public Declare Function BitBlt Lib "gdi32.dll" (hdc As IntPtr , nXDest As Integer, nYDest As integer, nWidth As Integer, nHeight As Integer, hdcSrc As IntPtr, nXSrc As Integer, nYSrc As Integer, dwRop As TernaryRasterOperations) As Boolean
Note the Lib "gdi32.dll", that's how to tell VB to load this function from a dll.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thats exactly what I did, and it complained about not finding
the entry point in the DLL. The example I had was "USBComunication",
it said that it could not locate the entry point in the DLL
|
|
|
|
|
OK, perhaps the DLL doesn't expose the entry point. To build a DLL with entry points, you need a seperate text file that defines them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm developing a application that consumes a webservice on my local
machine. The problem is that when I call the method of webservice I instantly get a WebException with no further information. The method can be called from IE. How can I find out the reason and solution for the exception?
Shashank Nema
|
|
|
|
|
I assume the web service doesn't require you to log on ? The odds are, it's a problem with your code that's connecting, or your connection.
Have you checked the InnerException ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Exception.InnerException object is Nothing and webservice is using windows authentication.
|
|
|
|
|
Do you have any access to the webservice ? What happens if you step into the code to see what line of the generated code is blowing up ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have access to webservice and it is embedded into my application however when I debug I am unable to hit webservice. It trhows me error before going to web service.
|
|
|
|
|
Then it's a connection issue. Firewall ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
No firewall everything is on same local machine.....
|
|
|
|
|
What line of code blows up ? Is the webservice published and IIS running ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Line of code is:
NotificationObject.ProcessRatingStatus(AppId, ObjProgressionEnum, ObjProcessStatusEnum, Message, RunLength, UserId)
ProcessRatingStatus is the function in Webservice which I want to call from my application. Also webservice and my application are both authenticated through windows authentication.
|
|
|
|
|
OK, so it is indeed the webservice call that fails, you said it was before. Attach a debugger to the aspnet process, with the webservice project open, run the app, and see if a breakpoint at the start of this function will trigger.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Breakpoint at the start of function does not trigger.
|
|
|
|
|
hi
i wrote a code which opens a resource.resx of a project but i want to find the word "str" in this resource with regex but i have errors.
maybe you can help me.
here is the code:
Dim rm As Resources.ResXResourceReader = New Resources.ResXResourceReader("C:\Documents and Settings\Developer1\Desktop\Developer2\Admin32 .NET.adela\My Project\Resources.resx")
Dim en As IDictionaryEnumerator = rm.GetEnumerator()
Dim regex1 As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(en)
Dim m As System.Text.RegularExpressions.Match
Dim word1 As String
Dim word2 As String
Dim text As String = "str"
While (en.MoveNext())
word1 = "Value:" + en.Value.ToString()
word2 = "Key: " + en.Key.ToString()
rm.Close()
m = regex1.Match(text)
End While
the eerror:"Unable to cast object of type 'N" to type 'Double' is not valid.
thank you
|
|
|
|
|
That's a weird error, there is no 'N' here that I can see. What line blows up ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
We have established the need for IDisposable and when to use it etc...
My question now pertains to a small Windows App. If I were to utilize a dataset for a DataGridView, an ErrorProvider, or something else that has a Dispose method, do I need to then implement the IDisposable class interface or will all of those things be cleaned up when the App exits?
-- modified at 9:50 Friday 23rd March, 2007
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
CleaKO wrote: the IDisposable class
There is no such thing. IDisposable is an interface.
You need to impliment IDisposable when you're writing a class which has members which themselves need to be disposed of, either managed stuff with IDisposable, or things like handles to database connections.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi i have a little question this code give me runtime error 91
object variable or with block variable not set.
with this codes i wanna search for \ and if found i wanna delete entire row.
and loop until no more \ in the excel sheet.
any ideas for that error?
Sub satirsil()
Do
Cells.Find(What:="\", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Rows("7:7").Select
Selection.Delete Shift:=xlUp
Selection.Find(What:="\", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Selection.Delete Shift:=xlUp
Selection.FindNext(After:=ActiveCell).Activate
Selection.Delete Shift:=xlUp
Loop Until IsEmpty(ActiveCell.Offset(0, 1))
End Sub
|
|
|
|
|
i found now this code and it works
Sub DeleteRows()
Dim rngeFound As Range, rngeSearchRange As Range
Set rngeSearchRange = ActiveSheet.Range("A1:A700")
Do
Set rngeFound = rngeSearchRange.Find("TIMING")
On Error Resume Next
If rngeFound.Rows.Count = 0 Then Exit Sub
On Error GoTo 0
rngeFound.Resize(6, 1).EntireRow.Delete
Loop
End Sub
|
|
|
|
|
I have a problem in my desktop application. I am using VS.NET 1.1. I am using Word template to display the data. I have already include the reference of Interop.Word.dll, AxInterop.MSMask.dll, Interop.VBIDE.dll, Interop.Microsoft.Office.Core.dll, Interop.MSMask.dll in our application.
When I click on the option it throw the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
at Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)
at iMSW.frmMain.openTemplateFile(String fileName) in D:\Project\Astin\iMSW_Prj\Forms\frmMain.vb:line 1257
This error is occur when user is using the MSOFFICE 2000. But if user is using the MSOFFICE 2003 it’s working fine.
Please help me.
OTAsh
|
|
|
|