Displaying 20 results from an estimated 32 matches for "lpstr".
Did you mean:
opstr
2006 Sep 16
0
converting 16-bit samples in LPSTR to short
Is "nBytes" what it says -- the number of bytes in the buffer? If so,
you're overshooting the buffer by 2x by multiplying by 2 in your array
access. You probably want a variable called "nSamples" that represents the
number of 16-bit words.
Also, if this is a little-endian (Windows on x86?) machine, you're
reassembling the word backwards.
Not to mention, shifting a
2006 Sep 16
3
converting 16-bit samples in LPSTR to short
Hi,
I am capturing 16 bit mono sound samples using some Win32 API function
calls. These function calls return the sound samples in an array of
characters. My assumption is that this array of characters represents pairs
of bytes that make up a short integer.
I'm using the following code to convert the samples:
LPTSTR *lpSaveBuffer;
......
for(j=0;j<nBytes;++J)
{
BYTE a =
2004 Feb 25
5
Wide strings and LPCTSTR types
All,
I was experimenting with converting LPCTSTR strings to wide strings with
something like this:
// Converts a Ruby string to a LPWSTR
LPCTSTR AllocWideLString(VALUE rbString){
char* str = STR2CSTR(rbString);
int length = (strlen(str)+1) * sizeof(WCHAR);
LPCTSTR lpStr = (LPCTSTR)malloc(length);
MultiByteToWideChar(
CP_ACP,
0,
str,
strlen(str)+1,
(LPWSTR)lpStr,
length
);
return lpStr;
}
But, that didn''t seem to work very well in testing. Is there a better
way? Otherwise, I''ll have to stick to ca...
2001 Apr 27
3
cant run wine at all dammit
i used to be able to run wine perfectly, before i reinstalled debian (long story)
now ive tried compiling the winehq.com CVS source, the transgaming CVS
source, and the latest official release, but whenever i run ANYTHING at
all, before it even gets a chance to start up, it kills X, and drops me
back to teh console.
this is the only output it gives:
Building font metrics. This may take some
2006 Nov 27
1
R.DLL mapping by P/Invoke
...hreaded.
/// </summary>
class RWrapper
{
#region <R.DLL interop signatures>
//- DLL Management/Information
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.LPStr)]
static extern string getDLLVersion();
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.LPStr)]
static extern string get_R_HOME();
[DllImport("R.DLL", /*Calling...
2007 Oct 17
0
Using R.dll in .NET IPC
...aded.
/// </summary>
class RWrapper
{
#region <R.DLL interop signatures>
//- DLL Management/Information
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.LPStr)]
static extern string getDLLVersion();
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.LPStr)]
static extern string get_R_HOME();
[DllImport("R.DLL", /*Calling...
2004 Nov 04
0
Running an exe from within a wined exe
...CODE////////////////////////////////////////////////////////////
CString commandLine;
commandLine = "\""+workingDirectory+"\\jpsec.exe\" -i "+textNameFolder+"
-urng "+resultFile+"";
// Converts CString to 'const char*' to further covert to LPSTR
const char* comLine;
int n = commandLine.GetLength();
comLine = commandLine.GetBuffer(n);
// Start the child process.
if( !CreateProcess(NULL,
//Example "\"JPSecWin32\\jpsec.exe\" -i .\\..\\..\\JPSecWin32\\lenna_enc.jp2
-o .\\..\\..\\JPSecWin32\\temp5.jp2 -k .\\..\\..\\JPSecWin...
2001 Aug 13
1
WineLib Linker Error?
...est.spec.c:73: undefined reference to `__wine_get_main_args'
/test/test.spec.c:74: undefined reference to `ExitProcess'
and this is the part of the test.spec.c file that was produced:
#include <winbase.h>
int _ARGC;
char **_ARGV;
extern int __stdcall WinMain(HINSTANCE,HINSTANCE,LPSTR,INT);
static void __wine_exe_main(void)
{
extern int __wine_get_main_args( char ***argv );
STARTUPINFOA info;
LPSTR cmdline = GetCommandLineA();
while (*cmdline && *cmdline != ' ') cmdline++;
if (*cmdline) cmdline++;
GetStartupInfoA( &info );...
2005 Dec 09
6
New Winecfg crash
I updated my copy of WINE CVS today, and now if I click the audio tab in
Winecfg, I'm getting this on my Mandrake 2006 machine.
*** glibc detected *** free(): invalid pointer: 0x7c0a6cd0 ***
wine: Assertion failed at address 0xffffe410 (thread 0009), starting
debugger...
This happens everytime I run winecfg and click the audio tab. Clicking
the other tabs works fine.
I've updated to
2004 Aug 06
2
C++ wrapper for speex
...about
container support at the moment because i'm working
with real-time audio, and hopefully toward VoIP when
everything else is in order.
im using waveform to capture data from the microphone.
the raw PCM sample is stored in the WAVEHDR
structure's member lpData, and this variable is of
LPSTR type.
if you have the time, can you please check on my test
code below and see where i could be having problems
with. (this is the handler that processes captured
audio)
LRESULT CRecordSound::OnSoundData(WPARAM wParam,
LPARAM lParam)
{
LPWAVEHDR lpHdr = (LPWAVEHDR) lParam;
int bu...
2007 Nov 04
3
WaveIn/WaveOut and Speex
Hello,
I know my question has been asked before because I spent the last week
searching the web for how to use Speex in combination with
WaveIn/WaveOut and I ran into a few posts, but none of them answer the
question. There is still a lot of confusion how to use WaveIn/WaveOut
and Speex by junior developers such as myself. Even after examining code
for SpeexDec and SpeexEnc, I cannot get clear
2007 Oct 11
3
Printing in Corel Draw through CUPS
...hat sets cbInput to 2 less
> than the
> * length of the string, rather than 2 more. So we'll use the
> WORD at
> * in_data[0] instead.
> */
> // if (!physDev->job.in_passthrough) {
> // WriteSpool16(physDev->job.hJob, (LPSTR)psbegindocument,
> sizeof(psbegindocument)-1);
> // physDev->job.in_passthrough = TRUE;
> // }
> // return
> WriteSpool16(physDev->job.hJob,((char*)in_data)+2,*(const WORD*)in_data);
>
> return PSDRV_WriteSpool(physDev, ((char*)in_dat...
2010 Mar 08
0
Difficulties in add cover art to FLAC file
...object_picture_set_mime_type( picture, "image/jpeg", true );
FLAC__metadata_object_picture_set_description( picture,
(FLAC__byte*)"", true );
CFile picfile;
picfile.Open( L"I:\\1.jpg", CFile::modeRead | CFile::shareDenyWrite);
ULONGLONG dwLength = picfile.GetLength();
LPSTR pData = new char[static_cast<unsigned int>(dwLength+1)];
picfile.Read(pData, static_cast<UINT>(dwLength));
FLAC__metadata_object_picture_set_data( picture, (FLAC__byte*)pData,
dwLength, true );
delete [] pData;
I did some tests and it seemed that the error was caused by
the FLAC__meta...
2007 Dec 22
1
Memory leaks
...trace:heap:RtlFreeHeap (0x110000,00000002,0x1101b8): returning TRUE
trace:heap:RtlAllocateHeap (0x110000,00000002,00000004): returning 0x110118
-- snip
code:
#include <windows.h>
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nCmdShow)
{
MessageBox(NULL, "Hallo", "Test", MB_OK);
return 0;
}
2008 Jul 19
0
Winelib: How can I compile a Borland C++ Builder application on Linux using winelib?
...USEFORM("chksaveS.cpp", ChkSave);
USEFORM("mainS.cpp", Main);
USEFORM("optionsS.cpp", Options);
USEFORM("editorOptions.cpp", EditorOptionsForm);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->Title = "EASy68K";
Application->CreateForm(__classid(TMain), &Main);
Application->CreateForm(__classid(TAboutBox), &AboutBox);...
2006 Dec 17
0
FormatMessage issue in eventlog.rb - more clues
...GE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_HMODULE |
FORMAT_MESSAGE_IGNORE_INSERTS;
hmod = LoadLibraryEx(dll, 0, LOAD_LIBRARY_AS_DATAFILE);
printf("HMOD: %i\n", hmod);
rv = FormatMessage(
flags,
hmod,
0,
0,
(LPSTR)&message,
0,
NULL
);
printf("RV: %i\n", rv);
FreeLibrary(hmod);
return 0;
}
This fails as expected.
More clues, but I''m still not sure what the appropriate solution is yet.
Regards,
Dan
2007 Nov 04
2
WaveIn/WaveOut and Speex
Thank you for such a quick response.
The only reason I started with Char buffers is because WaveIn and WaveOut on Windows XP accept/emit WAVEHDR structures, which store audio data in LPSTR, which is Char*.
typedef struct {
LPSTR lpData;
DWORD dwBufferLength;
...
} WAVEHDR;
When I was going from Char to float and back looked very wrong to me as well, but I was just not sure (and still am) how to translate the Char* audio stream generated by WaveIn to a format...
2004 Aug 06
1
C++ wrapper for speex
...ent because i'm working
> with real-time audio, and hopefully toward VoIP when
> everything else is in order.
>
> im using waveform to capture data from the microphone.
> the raw PCM sample is stored in the WAVEHDR
> structure's member lpData, and this variable is of
> LPSTR type.
>
> if you have the time, can you please check on my test
> code below and see where i could be having problems
> with. (this is the handler that processes captured
> audio)
>
> LRESULT CRecordSound::OnSoundData(WPARAM wParam,
> LPARAM lParam)
> {
> LPWAVEHDR...
2012 Mar 22
1
Page fault with MFC42.DLL
...lly link with MFC42.DLL but not when I link with MFC statically
I've created a simple test program to illustrate...
#include "stdafx.h"
#include "afxole.h"
Code:
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
COleDateTime curTime;
curTime=COleDateTime::GetCurrentTime();
CString nowStr;
nowStr=curTime.Format("'%c'"); /* CRASHES HERE */
printf("%s\n",nowStr);
return 0;
}
My setup is as foll...
2001 Nov 23
5
Communications problem
I am trying to get an home automation system called Thinkboxx
to run on a linux system, Thinkboxx has a windoze program that controls
the Thinkboxx over the com port. the program seems to be running well, but
when it tries to open the com ports it say that it has an "Unknown
Communications problem". I think my configuration of wine and the com port
is ok, i have spent
some time reading