|
nekokan wrote: When i set it as 2 and i set data (for output) at even point as 0, sound output in left side but sound output is different from i set numOutputChannel as 1.
Could you please rephrase?
- ns ami -
|
|
|
|
|
Can anyone tell me how to rename a vc++ project with its solution file.
I need step by step procedure.
Thanks in advance
|
|
|
|
|
What is it that you didn't understand in solutions provided yesterday.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
i tried this but its not working.
I followed following steps:
1)I installed vsrename.
2)I copied my project to that particular folder
3)then i cleaned sol file through clean all.
4)Then i used following command on command prompt:
C:\Documents and Settings\vsrename>vsrename oldfile newfile
Visual Studio Project Renamer v0.5 - Use with care!
Make backups before you use this program.
Do a 'Make Clean' on your original project before use.
Do a 'Rebuild All' on your renamed project.
By Niek Albers (nieka@daansystems.com)
Here we go:
/oldfile/: unmatched () in regexp at c:\vsrename\vsrename.pl li
ne 21.
This is coming.
And solution file is not renamed at all.
If you have another option please tell me
Thanks.....
|
|
|
|
|
why dont you try the GUI that is provided?? there is a link that is available in that site.
|
|
|
|
|
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 Friends,
My product has a feature of logging. Currently it is simple MACRO
based where during release build compiler removes logging function
calls. Now I am planning to make logging available during release
build as well. As a result user will simply pass some command line
parameter during process start and things will start logging.
Now as logging code will be present in my binary during release time,
this will enforce some types of checks even if the logging is not
enabled which will lead to CPU cost.
Is there any way to optimize these checks?
Are there any way where I can bypass these checks during normal
functional behavior.
Assembly, C, C++ compiler/code specific suggestions are welcome.
- Vikram S
|
|
|
|
|
If you write some generic logging function the type checking overhead is minimized. I use a global logging file, so there isnt a lot of stuff to do. Be careful if you do logging and multithreading!!
Greetings from Germany
|
|
|
|
|
vikrams wrote: Now as logging code will be present in my binary during release time,
this will enforce some types of checks even if the logging is not
enabled which will lead to CPU cost.
You mean you cant even check like this too?
if( bLogEnabled )
{
// code for logging...
}
- ns ami -
|
|
|
|
|
I can do this. But When there are hundreds of checks at runtime, will this be not an issue?
- Vikram S
|
|
|
|
|
AFAIK, this 'if' check will not bring any noticable change in the performance. I know even more complex logging mechanisms are used in professional softwares. Also you can avoid logs (if that much necessary) in some extremely performance oriented functions.
Note: You may simplyfy the code (only look) using by using macros, so that repeated if blocks can be avoided.
Eg.
#define LOG(x) if( bLogEnabled ) { LogString( x ); }
- ns ami -
|
|
|
|
|
i m developing msn protocol 15 in c++.but i faced a problem in contact management (in accept and accept & add scenario).
plz any one help.
|
|
|
|
|
Well, you have to fix the problem.
Okay, that's probably the most usefull answer we can give you seing how detailed your question was.
|
|
|
|
|
actually my problem is that when some one adding, than actual msn received a request and there is three option one is decline another one is accept with right click button and accept without right click button so on all the three process whats the actual msn doing on the server side i want that source code.
|
|
|
|
|
I really think you need to ask the Microsoft Guys for that.
|
|
|
|
|
Hi
I have the raw image and want to read it to do convolution. The image has 5 bytes header making all my code goes wrong. Could anyone suggest a way to read it.
The resolution for the image is 190 X 243, 8 bits and 5 bytes of header. Because I use
fopen and fread to open,read the file and I do not how to use pointer to modify the starting point of reading.
This is the image http://edventure.ntu.edu.sg/bbcswebdav/users/z050016/leaf.raw [^]
Thank you very much.
|
|
|
|
|
Use fseek to shift the file pointer.
Maxwell Chen
|
|
|
|
|
Hello to all,
I am using Visual C++ Express 2008, now I am trying to create an
DLL and use it next.
I think I do everything allright, compile the code. This code
creates a DLL file.
Next, I created code to use that DLL, after compile there is no errors.
During debug, it appears this error:
Unhandled exception at 0x00000000 in useDLL1.exe: 0xC0000005:
Access violation reading location 0x00000000.
In this moment, I don't know if the mistake is from the DLL file
or from the following code( it is for loads DLL ).
I need, and I appreciate some help to understand where is the problem.
----------------------------------------------------------------
#include <windows.h>
#include <iostream>
using namespace std;
typedef int (CALLBACK* DLLfunc)(int);
#pragma once
int main()
{
int i, result;
HINSTANCE loadFcn = LoadLibrary("createDLL1.dll");
// Check to see if the library was loaded successfully
if (loadFcn != 0)
cout << "\n *LoadMe library loaded!\n";
else
cout << "\n *LoadMe library failed to load!\n";
DLLfunc loadedFcn;
loadedFcn = (DLLfunc)GetProcAddress(loadFcn,"functeste");
result=loadedFcn(30);
//result = 10;
cout << "hello DLL" << endl << endl;
cout << loadedFcn;
cout << endl << result;
cin >> i;
return 0;
}
------------------------------------------------------------------------
|
|
|
|
|
You may try step by step debug to check each line.
- ns ami -
|
|
|
|
|
Hi,
I think GetProcAddress can't resolve the function address at your DLL.
Can you check your DLL if the function is exported from your DLL (e.g. with Depency Walker from VC, I'm not sure that it is included at the express version).
Is your DLL-func exported like
extern "C" __declspec(dllexport) int functeste(int i){....}
Take also a look to this article and my comment.
http://www.codeproject.com/KB/DLL/rsLoadtimeDLL.aspx?fid=29819&select=1269812&tid=1074998[^]
HTH
Frank
modified on Friday, February 20, 2009 2:06 AM
|
|
|
|
|
From GetProcAddress documentation [^]:
Return Value
If the function succeeds, the return value is the address of the exported function or variable.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
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]
|
|
|
|
|
In first, I want to thank all help.
- ns ami - : I already tryed that.
Debug stops on line:
"result=loadedFcn(30);"
I think that is when this command tries
to access to function into DLL.
Frank: Your tip was very fine. I did that.
"Depency Walker" didn´t get to read the DLL.
The problem seems to me, that is in DLL.
Now i'm trying to fix it. ...Another problem .
I made some alterations, and next I run "Depency Walker".
This time get to read the DLL.
But when I run debug, that code above,it occur the same error:
First-chance exception at 0x00000000 in useDLL1.exe: 0xC0000005:
Access violation reading location 0x00000000.
Unhandled exception at 0x00000000 in useDLL1.exe: 0xC0000005:
Access violation reading location 0x00000000.
CPallini:
I have tried your tip, and I added this line of code below
DWORD err = GetLastError();
it appears err = 127 ?? ( this meants it can't find the file ?? why? )
Could you help me?
Anyway, thanks for your concern.
|
|
|
|
|
Thanks to all, again.
I have reviewed all code and responses about this.
And I added some lines of code.
In the creation of DLL:
( extern "C" __declspec(dllexport) int functest(int i){....} )
And, using DLL:
typedef int (*MYFUNC)(int);
MYFUNC pnMyfunc = (MYFUNC)loadedFcn;
cout << " value of dll func = " << pnMyfunc(36) << endl;
FreeLibrary(loadFcn);
Next all DLL code:
#include <windows.h>
#include <iostream>
using namespace std;
typedef int (CALLBACK* DLLfunc)(int);
typedef int (*MYFUNC)(int); // --------------------------------- new line
#pragma once
int main()
{
int i;
DWORD err;
HINSTANCE loadFcn = LoadLibrary("createDLL1.dll");
err = GetLastError();
// Check to see if the library was loaded successfully
if (loadFcn != 0){
cout << "\n *LoadMe library loaded!\n";
DLLfunc loadedFcn;
loadedFcn = (DLLfunc)GetProcAddress(loadFcn,"functest");
MYFUNC pnMyfunc = (MYFUNC)loadedFcn; // -------------- new line
cout << endl << "hello DLL" << endl;
cout << " value of dll func = " << pnMyfunc(36) << endl;
cout << endl << " DLL func address " << *loadedFcn;}
else if (err){
cout << " erro - " << err;
cout << "\n *LoadMe library failed to load!\n";}
FreeLibrary(loadFcn);
cout << endl;
cout << endl << " **Free memory** " << endl;
cin >> i;
return 0;
}
|
|
|
|
|
MFC has the following two types CRgn and CRect
I know that the CRect Type has method like
BOOL IntersectRect(LPCRECT lpRect1,LPCRECT lpRect2)
But how could I find whether if two CRgn Objects have intersection or not?
|
|
|
|