|
Hello everyone,
I am new to RPC (TCP based) and IOCP, any recommended tutorials?
thanks in advance,
George
|
|
|
|
|
|
Hamid. wrote: (May I ask a question are you student?)
Doubtful. There was some speculation a while back that he is not even human, that he is a bot.
led mike
|
|
|
|
|
No, I am not.
regards,
George
|
|
|
|
|
Cool, Hamid!
I like both of them. I am your student.
regards,
George
|
|
|
|
|
No you are not,but you are a good china man,right?
|
|
|
|
|
Thanks Hamid,
Good man means?
regards,
George
|
|
|
|
|
Mean=Lin George.
|
|
|
|
|
Hello dear friend,
How can we control the system sound.
I want to control sound from my application.
I want following things to handle from the application
1)Mute/Unmute
2)Play/Pause
3)Adjustring the system volume.
How can I do these things?
Sample code would be appreciated.
Thanks in Advance.
ritz1234
|
|
|
|
|
|
|
Play and puase of other programs or your program?
|
|
|
|
|
As in the windows xp media player we can play/pause the song this what I want should be handled from the application.
ritz1234
|
|
|
|
|
|
ritz1234 wrote: 3)Adjustring the system volume.
How can I do these things?
Here is one example.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi, I have a sql in my program. What I want is exactly like this:
select *
from tbl t
where t.name like '%xyz%'
So in source code, I create sql like this:
CString name = "xyz";
::sprintf_s(szQuery, " select * from tbl t where t.name like '%%%s%%' ", name);
Here is szQuery when I execute
select *
from tbl t
where t.name like '%x%'
Just the first character is printed into szQuery.
What's wrong here? what should I do??
Thank you in advance.
|
|
|
|
|
Do you have UNICODE enabled ?
|
|
|
|
|
yes, Cedric. It's a Unicode project. In Project properties, The Character Set is "Use Unicode Character Set"
is that wrong?
|
|
|
|
|
Then you have to specify %S instead of %s. CString will return a wide-character string since UNICODE is enabled. If you look at the format specification[^] you can see that %S tells printf that the string is a wide-char string (when used with printf alike functions).
|
|
|
|
|
Thank you, Cedric.
I just change the Character Set property to "Use Multi-Byte Character Set" and it's ok now
modified on Thursday, July 17, 2008 9:40
|
|
|
|
|
I think your project is a unicode project. So the CString will be holding a pointer to unicode string. So you the following options.
1. use _stprintf_s() intead of sprintf_s( in this case szQuery also need to be TCHAR* or TCHAR[] ) or
2. Use CStringA instead of CString or
3. Convert CString content to multibyte characters using WideCharToMultiByte() API.
4. Undef _UNICODE.
|
|
|
|
|
5. Or simply use %S instead of %s
|
|
|
|
|
nice!!
If we use "Use Multi-Byte Character Set", it should be "%s".
Or if we use "Use Unicode Character Set", it should be "%S".
Thank you, Cedric!!
|
|
|
|
|
I will try them now. At least the option 2 works
There 're many functions similar to each other. It's so messy, and not easy to understand ....
Thank you, Naveen.
|
|
|
|
|
I have a base class A which is being inherited later & in one inherited class i had OVERLOADED one of the base class function.
The code snippet is given below.
class A{
public:
virtual void fun(){
cout<<"A";
}
};
class B: virtual public A{
public :
void fun(){
cout<<"k";
}
};
class C: virtual public A{
public:
int fun(int num){
cout<<"C";
}
};
class D: public C, public B{
};
void main(){
D dObj;
dObj.fun(4);
}
Can anyone tell me why i am getting an "ambigous" error in the fn call?
|
|
|
|