Click here to Skip to main content
15,894,337 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do you create an object from a C++ DLL in C# Pin
Nemanja Trifunovic21-Feb-02 14:52
Nemanja Trifunovic21-Feb-02 14:52 
GeneralPlaying sounds through c# Pin
Profox Jase21-Feb-02 4:57
Profox Jase21-Feb-02 4:57 
GeneralRe: Playing sounds through c# Pin
21-Feb-02 7:22
suss21-Feb-02 7:22 
GeneralRe: Playing sounds through c# Pin
Peter Stephens21-Feb-02 7:42
Peter Stephens21-Feb-02 7:42 
GeneralRe: Playing sounds through c# Pin
Profox Jase21-Feb-02 9:38
Profox Jase21-Feb-02 9:38 
GeneralRe: Playing sounds through c# Pin
Peter Stephens21-Feb-02 9:56
Peter Stephens21-Feb-02 9:56 
GeneralRe: Playing sounds through c# Pin
Profox Jase21-Feb-02 9:36
Profox Jase21-Feb-02 9:36 
GeneralRe: Playing sounds through c# Pin
Profox Jase22-Feb-02 0:37
Profox Jase22-Feb-02 0:37 
Hey Jerzy,

I tried this, but for some reason, none of the flags I pass in seem to make any difference. The sound does play though. Also, for some reason, when I use the enums as per your example, the code won't compile. I have tried subsituting the enums in the example for their values, but still things don't go according to my expectation (ie, makes no difference).

Does this declaration look right for c# to you?

public static extern long PlaySound(String lpszName, long hModule, long dwFlags);

As far as I understand it, my alternatives are:

1. no sound at all
2. use a com object as per my original fox pro code
3. for every sound played, create a new thread, play the sound, kill the thread
4. do some asynch calls with beginInvoke and delegates and stuff.

Don't want to do 1., 2. seems a good thing to learn in c#, in fact as does 3 and 4.

4 however I will have to leave until I have learnt a whole lot more or until someone explains the whole delegate thing to me.

If you have any more suggestions along the lines of your original, or anything else for that matter, would love to hear 'em.

Jase



Jason King

jason.king@profox.co.uk
Feel the love at www.profox.co.uk
GeneralRe: Playing sounds through c# Pin
22-Feb-02 3:35
suss22-Feb-02 3:35 
GeneralRe: Playing sounds through c# Pin
Peter Stephens22-Feb-02 7:48
Peter Stephens22-Feb-02 7:48 
GeneralRe: Playing sounds through c# Pin
Profox Jase25-Feb-02 5:25
Profox Jase25-Feb-02 5:25 
GeneralDropDownList in C# Application Pin
Gavin_Mannion20-Feb-02 23:10
Gavin_Mannion20-Feb-02 23:10 
GeneralRe: DropDownList in C# Application Pin
Christopher Lord20-Feb-02 23:38
Christopher Lord20-Feb-02 23:38 
GeneralRe: DropDownList in C# Application Pin
Gavin_Mannion21-Feb-02 0:50
Gavin_Mannion21-Feb-02 0:50 
GeneralRe: DropDownList in C# Application Pin
SimonS21-Feb-02 22:45
SimonS21-Feb-02 22:45 
GeneralRe: DropDownList in C# Application Pin
Gavin_Mannion21-Feb-02 22:53
Gavin_Mannion21-Feb-02 22:53 
GeneralRe: DropDownList in C# Application Pin
SimonS21-Feb-02 22:59
SimonS21-Feb-02 22:59 
GeneralRe: DropDownList in C# Application Pin
James T. Johnson22-Feb-02 7:29
James T. Johnson22-Feb-02 7:29 
GeneralSetting a timeout Pin
20-Feb-02 19:36
suss20-Feb-02 19:36 
QuestionHow to Map a C++ Struct from a DLL into C# Pin
Felix Nielsen20-Feb-02 11:44
Felix Nielsen20-Feb-02 11:44 
AnswerRe: How to Map a C++ Struct from a DLL into C# Pin
20-Feb-02 14:48
suss20-Feb-02 14:48 
GeneralRe: How to Map a C++ Struct from a DLL into C# Pin
20-Feb-02 22:15
suss20-Feb-02 22:15 
AnswerRe: How to Map a C++ Struct from a DLL into C# Pin
Filip21-Feb-02 3:32
Filip21-Feb-02 3:32 
AnswerRe: How to Map a C++ Struct from a DLL into C# Pin
James T. Johnson21-Feb-02 19:56
James T. Johnson21-Feb-02 19:56 
GeneralRe: How to Map a C++ Struct from a DLL into C# Pin
Felix Nielsen21-Feb-02 23:01
Felix Nielsen21-Feb-02 23:01 

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.