|
Your variable speex_nb_mode is never defined. You first have to define a variable before being able to use it (for instance you are passing its address to the speex_encoder_init function and the variable doesn't even exist).
|
|
|
|
|
you have to add libspeex.lib libspeexdsp.lib into the project setting ->link->object/library modules blank
a beginner
|
|
|
|
|
The whole time both libarys are include in the speex projekt. If i dont link it, there were more errors like this one.
I think &speex_nb_mode is not difine in the both libs?
|
|
|
|
|
Did you read my reply ? speex_nb_mode is a variable, so you should declare it somewhere. It is like using an integer, you first have to declare it before using it.
Is this variable supposed to be declared as a global variable in your library ? What is the type of this variable ? I am pretty sure you are missing the point here and simply forgot to declare the variable and blame it on the library
|
|
|
|
|
hmm
the docu:
5.1.4.10 void speex_encoder_init (const SpeexMode mode)<br />
Returns a handle to a newly created Speex encoder state structure. For now, the "mode" argument can be<br />
&nb_mode or &wb_mode . In the future, more modes may be added. Note that for now if you have more<br />
than one channels to encode, you need one state per channel.<br />
Parameters:<br />
mode The mode to use (either speex_nb_mode or speex_wb.mode)<br />
Returns:<br />
A newly created encoder state or NULL if state allocation fails
The error in VC++08;
failsextry2.obj : error LNK2001: Nicht aufgelöstes externes Symbol "_speex_nb_mode".
I think it isnt a variable.
Ah, in speex.h
void *speex_encoder_init(const SpeexMode *mode);
modified on Tuesday, February 3, 2009 9:41 AM
|
|
|
|
|
Hi all,
i am trying to add a set of binaries to registry but the size of the value i am trying to add is giving me 825243701 . any help is appriciated.
Regards,
KDevloper
|
|
|
|
|
Check Registry value limits[^]
It's better not to store huge data inside registry. it will increase the registry size, of the registry and also affects the performance. As per the recommendation from MSFT, data above 2KB should be stored as file.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Even i restricted the size the value does not appear at the registry.Below is the code:
CString szRegData = "NEW";
CString strData = "abcd";
HKEY hMainKey;
DWORD dwsize = strData.GetLength();
if(RegOpenKey(HKEY_LOCAL_MACHINE,"Software\\abc\\abc\\Current Version",&hMainKey)==ERROR_SUCCESS)
{
if(RegSetValueEx(hMainKey,szRegData,NULL,REG_BINARY,(LPBYTE)strData.GetBuffer(),dwsize)==ERROR_SUCCESS)
{
strData.ReleaseBuffer();
RegCloseKey(hMainKey);
return TRUE;
}
RegCloseKey(hMainKey);
}
Thanks &Regards,
kDevloper
|
|
|
|
|
Why are you trying to add a string as binary data?
Are you doing a UNICODE build?
Who (or, probably, what) is giving you '825243701'?
Where are you at 8:30 pm of yesterday (to complete the enquiry... )?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Palini,
It's not a kind of UNICODE Build, i have a set of values as say "12324323242300000",which i need to add to registry as REG_BINARY.
The earlier vaue was as a result of a different way of implementation. but lets forget the giant value.
i hope the lines of code will be my final way to implement .
Hey wat's dat " WER r u at...."
Regards,
KDevloper
|
|
|
|
|
|
how can i get list of connected cameras with system? by using capGetDriverDescription() i just get the driver name which can be common for many capturing device
|
|
|
|
|
This sample[^] talks about device, rather than driver names?
|
|
|
|
|
reference u provide gives information of driver not device
i need device name (i need all cammera names which are connceted with system)
how it will possible?
|
|
|
|
|
Hi everyone,
Could anyone please tell me how to use message queue using ace framework....A simple message queue,(without any socket programming)....
Thanks in advance
I am a learner Always
|
|
|
|
|
|
Hi all,
In my application I want to handle the insert(plug in) and removal(plug out) of the devices so that i have to re enumerate and show the user present devices connected to the system.But my application is limited to re enumeration of HID devices only, so i want to handle the device change only for HID devices.
I handled the WindProc() in which I used if(message == WM_DEVICECHANGE) but I am getting in to this loop for every device change but how can I check whether device change is for HID devices or not.
Please suggest a right approach for this.
Thanks in advance.
|
|
|
|
|
|
Hi. I am sure you can help me.
I want to write a program that just detect that a device has been changed. And in my program it is not concerned which device is changed. I have been trying for 15days but not able to handle windproc function. I am not getting any clue how to handle this function. Please send me a sample code. Please please please. I am getting really sick of this. Send me at john.alex.programmer@gmail.com. Please help me. PLZ PLZ PLZ PLZ PLZ.
|
|
|
|
|
Hi. I am sure you can help me.
I want to write a program that just detect that a device has been changed. And in my program it is not concerned which device is changed. I have been trying for 15days but not able to handle windproc function. I am not getting any clue how to handle this function. Please send me a sample code. Please please please. I am getting really sick of this. Send me at john.alex.programmer@gmail.com. Please help me.
|
|
|
|
|
Hi Alex,
Did u try with the WindowProc(...) and if(message == WM_DEVICECHANGE ) inside it? This will be triggered if there is any change in the device connected to the system (Like plugging and Unplugging)
|
|
|
|
|
I have tried. But you know the main problem with me is that i dont know how to write windproc function and what are the parameters. I just want a running sample of windproc function. Then I will definitely do. Thanx.
|
|
|
|
|
LRESULT ClassName::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
if(message == WM_DEVICECHANGE )
{
}
return CDialog::WindowProc(message, wParam, lParam);
}
Note : In the first line when i say ClassName it is your respective class name.
|
|
|
|
|
#include <windows.h>
#include <dbt.h>
#include <strsafe.h>
#include<iostream.h>
#pragma comment(lib, "user32.lib")
void Main_OnDeviceChange (HWND hwnd, WPARAM wParam, LPARAM lParam);
char FirstDriveFromMask (ULONG unitmask); //prototype
/*------------------------------------------------------------------
Main_OnDeviceChange (hwnd, wParam, lParam)
Description
Handles WM_DEVICECHANGE messages sent to the application's
top-level window.
--------------------------------------------------------------------*/
HWND hwnd;
WPARAM wParam;
LPARAM lParam;
void Main_OnDeviceChange (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)lParam;
char szMsg[80];
switch(wParam)
{
case DBT_DEVICEARRIVAL:
// Check whether a CD or DVD was inserted into a drive.
if (lpdb -> dbch_devicetype == DBT_DEVTYP_VOLUME)
{
PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME)lpdb;
if (lpdbv -> dbcv_flags & DBTF_MEDIA)
{
StringCchPrintf (szMsg, 80, "Drive %c: Media has arrived.\n",
FirstDriveFromMask(lpdbv ->dbcv_unitmask));
MessageBox (hwnd, szMsg, "WM_DEVICECHANGE", MB_OK);
cout<<"Hi";
}
}
break;
case DBT_DEVICEREMOVECOMPLETE:
// Check whether a CD or DVD was removed from a drive.
if (lpdb -> dbch_devicetype == DBT_DEVTYP_VOLUME)
{
PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME)lpdb;
if (lpdbv -> dbcv_flags & DBTF_MEDIA)
{
StringCchPrintf (szMsg, 80, "Drive %c: Media was removed.\n",
FirstDriveFromMask(lpdbv ->dbcv_unitmask));
MessageBox (hwnd, szMsg, "WM_DEVICECHANGE", MB_OK);
cout<<"Hi";
}
}
break;
default:
/*
Process other WM_DEVICECHANGE notifications for other
devices or reasons.
*/
;
}
}
/*------------------------------------------------------------------
FirstDriveFromMask (unitmask)
Description
Finds the first valid drive letter from a mask of drive letters.
The mask must be in the format bit 0 = A, bit 1 = B, bit 2 = C,
etc. A valid drive letter is defined when the corresponding bit
is set to 1.
Returns the first drive letter that was found.
--------------------------------------------------------------------*/
char FirstDriveFromMask (ULONG unitmask)
{
char i;
for (i = 0; i < 26; ++i)
{
if (unitmask & 0x1)
break;
unitmask = unitmask >> 1;
}
return (i + 'A');
}
int main()
{
while(1)
{
Main_OnDeviceChange (hwnd,wParam,lParam);
}
return 0;
}
I found this code on msdn. Where to write it in Vc++. On win32 application or on simple c++ file. Neither main() function is here no win_main function is here. Please help.
|
|
|
|
|
Hi
I am using a multidocument application.
CMultiDocTemplate* pDocTemplate_Digi;
pDocTemplate_Digi = new CMultiDocTemplate(
IDR_DIGITAL,
RUNTIME_CLASS(CDDRUDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CSuperGrid1View));
my view CSuperGrid1View is inherited from CFormview.
I want to disable the scroll bars that is coming default in my view.
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs]
cs.style &= ~WS_EX_RIGHTSCROLLBAR;
cs.style &= ~WS_EX_LEFTSCROLLBAR ;
if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;
}
I did the same in CSuperGrid1View::PreCreateWindow(..)
But it is not disabling.Can anybody help me please.
Regards
Deepu
|
|
|
|