Click here to Skip to main content
15,910,083 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionGetClusterInformation is not working Pin
programvinod11-Mar-07 23:43
programvinod11-Mar-07 23:43 
AnswerRe: GetClusterInformation is not working Pin
prasad_som11-Mar-07 23:49
prasad_som11-Mar-07 23:49 
GeneralRe: GetClusterInformation is not working Pin
programvinod12-Mar-07 1:42
programvinod12-Mar-07 1:42 
AnswerRe: GetClusterInformation is not working Pin
prasad_som12-Mar-07 1:53
prasad_som12-Mar-07 1:53 
GeneralRe: GetClusterInformation is not working Pin
programvinod12-Mar-07 2:24
programvinod12-Mar-07 2:24 
QuestionShow the hour of execution of a process Pin
abbd11-Mar-07 19:56
abbd11-Mar-07 19:56 
AnswerRe: Show the hour of execution of a process [modified] Pin
George L. Jackson12-Mar-07 6:34
George L. Jackson12-Mar-07 6:34 
Questionquestion in using TCHAR* Pin
Stick^11-Mar-07 17:20
Stick^11-Mar-07 17:20 
Hi,

I'm a bit new to this TCHAR stuff, so I'm confused as to how to do what I need to do.

I created a struct

struct gaugeSound
{
int buffer;
TCHAR* filename;
// char* filename;
bool loop;
bool isLoaded;
};

That I originally stored a filename in as a char*, but later changed to TCHAR* to try to deal with this issue. This has not worked.

With the above struct, I do this:

gaugeSound sound_EngOut = { 0, L"sound\\B206B-III\\Loop_EngOut.wav", true, false };

(here I added the 'L', but originally I just used a char*)

Then I try to do this:

LoadWaveFile(sound_EngOut.buffer, sound_EngOut.filename);
sound_EngOut.isLoaded = true;

however the LoadWaveFile() function was defined like this:

extern "C" VOID LoadWaveFile( WORD BufferN, TCHAR* strFileName )
{
// Create the sound buffer object from the wave file data
if( FAILED( CreateStaticBuffer( BufferN, strFileName ) ) )
{
return;
}
else // The sound buffer was successfully created
{
// Fill the buffer with wav data
FillBuffer(BufferN);
}
}

so originally I changed it to this:

//extern "C" VOID LoadWaveFile( WORD , const char* );

but since that didn't work I am trying to go with the original again.

Yet... there is a problem.... as in this function...

HRESULT CreateStaticBuffer( WORD BufferN, TCHAR* strFileName )
{
HRESULT hr;

// Free any previous globals
SAFE_DELETE( g_pWaveSoundRead [BufferN]);
SAFE_RELEASE( g_pDSBuffer [BufferN]);

// Create a new wave file class
g_pWaveSoundRead[BufferN]= new CWaveSoundRead();

// Load the wave file
if( FAILED( g_pWaveSoundRead[BufferN]->Open( strFileName ) ) )

<snip...>

the Open() call above requires (in WaveRead.cpp) a CHAR* !!!!!!

So, it seems that I have no clue how to use this DirectSound code that has been programmed with TCHAR*, especially since when I use the 'L', the above function can then not be called.

Help! What the heck am I supposed to begin doing?
AnswerRe: question in using TCHAR* Pin
Mark Salsbery11-Mar-07 17:54
Mark Salsbery11-Mar-07 17:54 
GeneralRe: question in using TCHAR* Pin
Stick^11-Mar-07 19:16
Stick^11-Mar-07 19:16 
Questioncalculating conversion question... Pin
RubyM11-Mar-07 11:28
RubyM11-Mar-07 11:28 
AnswerRe: calculating conversion question... Pin
Christian Graus11-Mar-07 10:52
protectorChristian Graus11-Mar-07 10:52 
GeneralRe: calculating conversion question... Pin
RubyM11-Mar-07 12:17
RubyM11-Mar-07 12:17 
AnswerRe: calculating conversion question... Pin
lafleon12-Mar-07 12:19
lafleon12-Mar-07 12:19 
QuestionStatic linking to user-generated library in MSVC Pin
Still learning how to code11-Mar-07 4:46
Still learning how to code11-Mar-07 4:46 
AnswerRe: Static linking to user-generated library in MSVC Pin
Christian Graus11-Mar-07 5:14
protectorChristian Graus11-Mar-07 5:14 
GeneralRe: Static linking to user-generated library in MSVC Pin
Still learning how to code11-Mar-07 6:14
Still learning how to code11-Mar-07 6:14 
QuestionReferences and (re)building. Pin
Bartosz Bien10-Mar-07 13:11
Bartosz Bien10-Mar-07 13:11 
QuestionI need help for creating array [modified] Pin
thesad10-Mar-07 8:40
thesad10-Mar-07 8:40 
AnswerRe: I need help for creating array Pin
Christian Graus10-Mar-07 8:59
protectorChristian Graus10-Mar-07 8:59 
GeneralRe: I need help for creating array Pin
thesad10-Mar-07 9:17
thesad10-Mar-07 9:17 
AnswerRe: I need help for creating array Pin
Jeff J Anderson10-Mar-07 9:16
Jeff J Anderson10-Mar-07 9:16 
QuestionContextMenuStrip Pin
abbd10-Mar-07 8:31
abbd10-Mar-07 8:31 
QuestionRe: ContextMenuStrip [modified] Pin
abbd10-Mar-07 9:34
abbd10-Mar-07 9:34 
QuestionRe: ContextMenuStrip Pin
abbd10-Mar-07 10:09
abbd10-Mar-07 10:09 

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.