Click here to Skip to main content
15,914,820 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Framework Version Pin
Luc Pattyn17-Aug-07 7:31
sitebuilderLuc Pattyn17-Aug-07 7:31 
GeneralRe: Framework Version Pin
Scott Dorman17-Aug-07 7:41
professionalScott Dorman17-Aug-07 7:41 
AnswerRe: Framework Version Pin
Scott Dorman17-Aug-07 7:48
professionalScott Dorman17-Aug-07 7:48 
GeneralRe: Framework Version Pin
jchigg200017-Aug-07 7:58
jchigg200017-Aug-07 7:58 
AnswerRe: Framework Version Pin
Vasudevan Deepak Kumar20-Aug-07 20:36
Vasudevan Deepak Kumar20-Aug-07 20:36 
Question64-bit Interop Pin
Leslie Sanford17-Aug-07 6:42
Leslie Sanford17-Aug-07 6:42 
AnswerRe: 64-bit Interop Pin
Abisodun17-Aug-07 6:49
Abisodun17-Aug-07 6:49 
GeneralRe: 64-bit Interop [modified] Pin
Leslie Sanford17-Aug-07 7:23
Leslie Sanford17-Aug-07 7:23 
Abisodun wrote:
Use IntPtr in place of Int32.


But does this mean having to allocate unmanaged memory for the pointer?

If I do this:

IntPtr handle = new IntPtr();
 
int result = waveOutOpen(handle, deviceID, ref format, 0, 0, CALLBACK_NULL);


waveOutOpen returns an error.

If I have to allocate unmanaged memory for the pointer (ugh), how do I tell how much to allocate? On a 32-bit system it will be 4 bytes. On a 64-bit system it will be 8 bytes.

[EDIT]

Nevermind. I discovered that I need to declare my interop method like this:

[DllImport("winmm.dll")]
public static extern int waveOutOpen(out IntPtr handle, int deviceID, ref WaveFormat format, 
    int dummy, int instance, int flags);


The key is to use the out modifier on the IntPtr parameter.

Thanks for your help. Smile | :)

[/EDIT]

-- modified at 13:34 Friday 17th August, 2007
GeneralRe: 64-bit Interop Pin
Dave Kreskowiak17-Aug-07 7:35
mveDave Kreskowiak17-Aug-07 7:35 
GeneralRe: 64-bit Interop Pin
Leslie Sanford17-Aug-07 7:38
Leslie Sanford17-Aug-07 7:38 
GeneralRe: 64-bit Interop Pin
Luc Pattyn17-Aug-07 7:38
sitebuilderLuc Pattyn17-Aug-07 7:38 
GeneralRe: 64-bit Interop Pin
Leslie Sanford17-Aug-07 7:42
Leslie Sanford17-Aug-07 7:42 
GeneralRe: 64-bit Interop Pin
Luc Pattyn17-Aug-07 7:47
sitebuilderLuc Pattyn17-Aug-07 7:47 
GeneralRe: 64-bit Interop Pin
Leslie Sanford17-Aug-07 8:04
Leslie Sanford17-Aug-07 8:04 
GeneralRe: 64-bit Interop Pin
Luc Pattyn17-Aug-07 8:14
sitebuilderLuc Pattyn17-Aug-07 8:14 
GeneralRe: 64-bit Interop Pin
Leslie Sanford17-Aug-07 11:30
Leslie Sanford17-Aug-07 11:30 
GeneralRe: 64-bit Interop Pin
Luc Pattyn17-Aug-07 12:39
sitebuilderLuc Pattyn17-Aug-07 12:39 
QuestionIs any Record Set Concept is there in OLEDB Pin
Praveen 12317-Aug-07 1:29
Praveen 12317-Aug-07 1:29 
AnswerRe: Is any Record Set Concept is there in OLEDB Pin
Scott Dorman17-Aug-07 10:26
professionalScott Dorman17-Aug-07 10:26 
Questionflash button Pin
michael_jhons16-Aug-07 21:42
michael_jhons16-Aug-07 21:42 
AnswerRe: flash button Pin
pmarfleet16-Aug-07 23:33
pmarfleet16-Aug-07 23:33 
QuestionSource C# for Chinese Chess Pin
Quoc Trang16-Aug-07 17:54
Quoc Trang16-Aug-07 17:54 
QuestionHow To install msi file along with my app setup Pin
Mayur16-Aug-07 4:52
professionalMayur16-Aug-07 4:52 
QuestionHow to raise events while clicking a datalist item or a particular Row?? Pin
bijeshputhalath15-Aug-07 21:42
bijeshputhalath15-Aug-07 21:42 
AnswerRe: How to raise events while clicking a datalist item or a particular Row?? Pin
- Pascal -17-Aug-07 9:11
- Pascal -17-Aug-07 9:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.