|
Do you know a way to lookup up what the cause of ERROR_NO_MORE_ITEMS is?
|
|
|
|
|
Is this returned by GetExitCodeThread ?
|
|
|
|
|
No! Like I said before, because it's GUI app.
Created a timer event that monitors how the process is doing.
Those URLs I posted are currently causing the thread to freeze after the receiving loop finishes.
During that the timer checks the thread error state, receiving ERROR_NO_MORE_ITEMS.
After 3-4 minutes have elapsed the thread finishes, the timer event returns thread has exited successfully.
Do you think increasing thread priority would do the trick. Or would it hurt my application?
I tried looking up ERROR_NO_MORE_ITEMS for details, but was unsuccessful however the only thing I managed to dig up was the Windows Error Codes.
|
|
|
|
|
i got a C code for FIR from the nuhertz filter software, am not sure if am using it correctly. i implemented it as shown below and also did a manual calculation using coeffiecients and the answers do not match at all.instead of reducing the amplitude, its the other way round. am not sure if anyone has used this before
int setic ;
float initvar;
for (int i = 0;i<=146; i++)
{
for(int z = 0;z<=8;z++)
{
if (z == 0)
{
setic = 1;
initvar = raw_data[i][1];
}
else
{
setic = 2;
}
results2[i][1] = DigFil_fir(raw_data[i][1],initvar,setic) ;
}
}
float DigFil_fir(float invar,float initval, int setic)
{
float sumnum; int i;
static float delay[9] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
static float znum[9] = {
6.205e-02,9.553e-02,.1241,.1433,.1501,.1433,.1241,9.553e-02,6.205e-02
};
if (setic==1){
for (i=0;i<=8;i++) delay[i] = 1.0*initval;
return initval;
}
else{
sumnum=0.0;
for (i=0;i<=7;i++){
delay[i] = delay[i+1];
sumnum += delay[i]*znum[i];
}
delay[8] = invar;
sumnum += delay[8]*znum[8];
return sumnum;
}
}
modified on Thursday, April 29, 2010 11:11 AM
|
|
|
|
|
Hi,
The variable 'initvar' is declared within the 'if' code, therefore it would not be available to pass to the function 'DigFil_fir'. This code should not compile, unless you have another 'initvar' declared, if so this is your problem.
Hope this helps,
Ali
|
|
|
|
|
thanks, thats a copy and paste mistake...the code compiles just that i dont understand why i dont get the expected result
|
|
|
|
|
buki86 wrote: thanks, thats a copy and paste mistake
If you want people to help you with your code and you paste it in a message for them to check, I think you should make sure that it is the code you are testing ..... putting your original post right might be nice too, if you want more help .....
Just sayin ......
Ali
|
|
|
|
|
The thing that jumps out at me is the index range for the first for loop 1 to 146? With C? 0 to 145 would sound more idiomatically correct?
But it's very difficult to tell without a little more code...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
buki86 wrote: i implemented it as shown below and also did a manual calculation using coeffiecients and the answers do not match at all.instead of reducing the amplitude, its the other way round.
So have you stepped through the code using the debugger to see what the values are?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
I have created a dialog based application in visual studio 2010 and I have added a CSplitButton Control to my dialog through resource editor, also I have made a menu in resource editorwith the ID of IDR_MENU_BUTTON_FILE and a sud menu after all, my code looks like the following code:
BOOL CMyDialogDlg::OnInitDialog()
{
CSplitButton* pCtrlSpiltBtn = (CSplitButton*)this->GetDlgItem(IDC_SPLITBUTTON1);
pCtrlSpiltBtn ->SetDropDownMenu(IDR_MENU_BUTTON_FILE, 0);
}
however the pCtrlSpiltBtn get initialized correctly and every thing is OK. but
pCtrlSpiltBtn ->SetDropDownMenu(IDR_MENU_BUTTON_FILE, 0);
fails when I trace the case I found that this line call the following methods of MFC classes.
void CSplitButton::SetDropDownMenu(UINT nMenuId, UINT nSubMenuId)
{
Cleanup();
m_nMenuId = nMenuId;
m_nSubMenuId = nSubMenuId;
}
void CSplitButton::SetDropDownMenu(CMenu* pMenu)
{
Cleanup();
m_pMenu = pMenu;
}
void CSplitButton::Cleanup()
{
if (m_pMenu)
{
delete m_pMenu;
}
m_pMenu = NULL;
m_nMenuId = (UINT)-1;
m_nSubMenuId = (UINT)-1;
}
and the m_pMenu pointer is always initialized and while the line
delete m_pMenu;
get executed all the application ruining fails.
Please help me solve the case, what should I do?
|
|
|
|
|
Hello Sir
Currently i have create the pdf document from JPEG images , i have create the pdf document is successfully my question is ,
when i was create the pdf document margin is same , but i need to create separate margin , i dont know how to do that ?
please help me sirs
this is my JPEG2PDF file
Failure is Success If we learn from it!!
modified on Wednesday, April 28, 2010 2:02 PM
|
|
|
|
|
Game-point wrote: ...but i need to create separate margin...
A separate margin? Separate from what?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
thanks for your replay ..i solved it
Failure is Success If we learn from it!!
|
|
|
|
|
hi
i want to run an dshow an application in my project and limit it to my MDI form !
can i do it? if yes how can i?
|
|
|
|
|
you want an application to run inside your application ?
does this help[^]?
|
|
|
|
|
I think you should write hWnd of MDI form in dshow owner device.
|
|
|
|
|
There is a 3rd lib only accept char* filename e.g.
3rdlib_func_name(char* file_name) . Every things get wrong when I provide a filename in Chinese or Japanese.
Is there any way to make this lib open UNICODE filename? The program is running on Windows.
Thanks for your reply.
A Chinese VC++ programmer
|
|
|
|
|
zengkun100 wrote: Is there any way to make this lib open UNICODE filename?
Only by changing its source code. You will have to go to the suppliers of the library to get it changed if you do not have the source.
It's time for a new signature.
|
|
|
|
|
Richard MacCutchan wrote: Only by changing its source code. You will have to go to the suppliers of the library to get it changed if you do not have the source.
I think so.
In theory, char* cant only be used to point to a UTF8 UNICODE string, however, you cannot give a UTF8 filename to fopen or some other file functions. But if I transfer this UNICODE filename to char* using CP_ACP, some of the characters cannot be changed.
A Chinese VC++ programmer
|
|
|
|
|
Exactly right, which is why all software suppliers should be providing full Unicode support. I think you need to talk to the supplier of the library and get them to change it. You may also note that _wfopen is the Unicode version of the file open function, so there is no problem with Unicode file names.
It's time for a new signature.
|
|
|
|
|
Thanks for your reply again We have called our partner this afternoon.
A Chinese VC++ programmer
|
|
|
|
|
If your app is UNICODE!
Their is a function to change UNICODE string to CHAR!
wcstombs[^]
But I guess that won't fix it either if your filenames are in UNICODE.
|
|
|
|
|
Fareed Rizkalla wrote: If your app is UNICODE!
Their is a function to change UNICODE string to CHAR!
wcstombs[^]
But I guess that won't fix it either if your filenames are in UNICODE.
Yes, even if I transferred the UNICODE filename to a char*(using CP_ACP or CP_UTF8), the 3rd lib don't accept this filename and returns a "file not found" error code.
A Chinese VC++ programmer
|
|
|
|
|
Has anyone SetHotKeys before for a IShellItem!
I did setup a HotKey through
RegisterHotKey (g_hWindow, 0, MOD_CONTROL | MOD_NOREPEAT, 0x4E);
It works fine, but I want to use the IShellItem to hookup to the same HotKey.
Seen some examples using HOTKEYF_CONTROL instead MOD_CONTROL, which is it!
Some people confuse the HIWORD instead of the LOWORD, if anybody knows any solid details please help!
Thanks in advance.
|
|
|
|
|
Using visual studio 2008 I created a small vc++ project and ran it using the exe created.
The problem is the exe runs fine on my PC.
But when I tried to run the exe on an another PC it gave the error "The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
Any idea as to what may be causing this error and how to resolve it?
|
|
|
|