If you think that the official Microsoft tutorials don't tutor well (and I'd mostly agree with you), then Jason Clark wrote a pretty good piece for MSDN called Calling Win32 DLLs in C# with P/Invoke[^].
Either way that you learn, you'll need the signature of the method; you can get that from the VB script file.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
this has been a great help, and even though i understand it all much better. i still can't find the Entrypoints for the Dll. i have tried using Link /dump /exports dllname.dll and this doesn't return anything that is used in the VB script.
i have used COM browser and this shows more details, but when i use these details in the C# code it return a unable to find an entry point exception.
Luc Pattyn [Forum Guidelines][My Articles] - before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
Why do you ask these kind of questions to us?
The internet is like a very big book. To find some stuff in the book you can either ask people who have read it or you scan the text. For the big book called 'the internet' there are many full automatic scanners available (google.com for instance). If you have found a piece of usefull information, you should read the piece... if you'd done that, you wouldn't be asking questions.
i have a code below, it can run but didn't work actually. can you help me?
here is my process:
Start Recording-> Stop Recording-> Play sound: nothing happened -> Play Sound (second): error at line
'this.captureBuffer.Read(0, this.stream, 100000, LockFlag.None);'
(Memory stream is not expandable.)
using Buffer = Microsoft.DirectX.DirectSound.Buffer;
If the app.config format is wrong, for example, not a correct format XML file, application will fail from loading. Are there any ways to let me know such issue -- for example, receiving some events (so that I could write file log and event log to record this issue) if app.config loads error because of a mal-formatted XML file?
That I don't know. I've only ever used a top level handler designed to just stop the application dead in it's tracks if the config file is corrupted. If the exception occurs within the dll it will of course be passed up the call stack until a handler is found.
One thing to note is that changes to the dll's user scoped configuration settings are stored in the exe's user.config file so I suspect the best place to trap any exceptions caused by malformed xml is very early in the execution of the application.
Anything more precise than that is beyond my current level of knowledge. I had a quick look at the System.Configuration namespace and decided I wouldn't go back there again unless I absolutely had to!