|
Max++ wrote: Serach Results about 94,200,000 for "how to write windows service" is too much...
The first four links returned are sufficient. In any case, my point was that you could have very easily Googled for an answer in less time than it took to post a question here.
Max++ wrote: I think this link useful to you.
http://www.codeproject.com/system/windows_startup.asp
Doubtful, since I was not looking for code to write a service. As an aside, adding your application to the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run key will cause it to start after a user logs in, not when Windows is booting.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
CodeProject is a good place to start: clickety[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
|
Hi ALL,
I want to record Live audio and store into .wav format. Currently I can record(iff we talk directly into mike ) as well as store audio into .wav file format.
But I stucked with the quality of audio signal as after playing the recorded sound , noise is also mixing with the recording. I don't know which Filter shd I use to Filter the noise? apart from this Is it necessary to amplify the signal, so that I can record the chat/sound properly in the room also ??
Is there any other way?? Please help me out.
ThanX in advance
CraZyToLearn
|
|
|
|
|
Hi all,
Pls help me...
i don't know how to write a call back function.
anybody please tel me with any example please or give any suitable links
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
|
|
Hi,
Can u please help me..
i declared a call back function as
static int CALLBACK CalBckFun( int param );
now please tel me that how can i call this call back function.
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
see me wrote:
now please tel me that how can i call this call back function.
It sounds as though you need a primer on callbacks.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
see me wrote: now please tel me that how can i call this call back function.
It's just a function - call it like normal:
int callbackreturn = CalBckFun(0);
Usually functions declared with the CALLBACK spec are meant to be called by the OS.
|
|
|
|
|
Hi,
I am using ADOs.There are about 1500 records I need to fetch from the database.The process of retrieval is taking more than 45 seconds.Is there any other approach with which I can retrieve the records fast.
Thanks in advance,
Taruni
|
|
|
|
|
Is the database on some other computer? What does your code look like that is fetching those records?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The database is in the same computer where my program resides.Actually I am fetching the records from the database and placing them on a grid control.
The code for fetching the records is as follows:
_ConnectionPtr pConn;
_RecordsetPtr pRecSet;
TCHAR strQuery[5000];
HRESULT hr;
CString strConn;
hr=pConn.CreateInstance(__uuidof(Connection));
if (SUCCEEDED(hr))
{
}
else
{
AfxMessageBox(_T("Failed to establish connection"));
return;
}
strConn.Format(_T("Provider=Microsoft.Jet.OleDB.4.0;Data source=%s;"),strPath);
hr=pRecSet.CreateInstance(__uuidof(Recordset));
if (SUCCEEDED(hr))
{
}
else
{
AfxMessageBox(_T("Recordset creation failed"));
return;
}
BSTR bstrconn = strConn.AllocSysString();
BSTR bstrNull = NULL;
hr = pConn->Open(bstrconn,bstrNull,bstrNull,adModeUnknown);
if(FAILED(hr))
{
AfxMessageBox(_T("Failed to open database connection"));
return;
}
try
{
VARIANT v;
VariantInit(&v);
v.vt=VT_BSTR;
_stprintf(strQuery,_T("Select * from MyDatabase"));
CString str;
CString strColName;
while(!(VARIANT_TRUE == pRecSet->EndOfFile))
{
for(int i=0;i<columnnames.getsize();i++)
{
=""
="" strcolname="ColumnNames.GetAt(i);
" v.bstrval="strColName.AllocSysString();
" fieldsptr="" fp;
="" fp="pRecSet-">Fields;
_variant_t var;
VariantInit(&var);
var= fp->GetItem(v)->GetValue();
str = var.bstrVal;
AfxMessageBox(str);
}
pRecSet->MoveNext();
}
pRecSet->Close();
pConn->Close();
}
catch()
{
.......
}
Taruni
|
|
|
|
|
Taruni wrote: AfxMessageBox(str);
Displaying a messsage box 1500 times will undoubtedly cause a delay.
Have you consulted any of these articles?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i dont know how to use sax2 parser with c++ can any body help me. what should i installed , and how could i use it to read my XML file?
please give me the detail for SAX2, if possible send me link....
Amit
|
|
|
|
|
|
Thank you
|
|
|
|
|
|
Hi,
How to kill a process given a process ID
Thanks and Regards,
Venkat
|
|
|
|
|
|
|
Killing a process should only be a last resort and can be dangerous; better to ask it to close down. That said, you can use the TerminateProcess API to kill a process given a HANDLE to the process. The OpenProcess function can be used to get a process HANDLE from its id.
Steve
|
|
|
|
|
I have made a simple MFC exe..in VS 6.0...which has all the resources in the english language...
I have to create a Resource Only DLL in some other language say..German...so...when i click on a resource and insert a copy of it in German language..(Insert -> Resource copy....which..opens a Dialog where I can choose the resource language)....then the resource still has the text in english...but the microsoft articles say it should be translated to German.....(Point no.8 in the article http://support.microsoft.com/kb/198846)
The other way is ....I create a fresh MFC exe choosing German language from the beginning and copy its German Resources script file to the english mfc exe..
Wats going wrong in the former..approach....plzzz help me out..
Thnx...
...A Master Programmer may or may not be the master of the programming language grammar...
|
|
|
|
|
To use a resource only dll, you need to create a dll that contains all of your string resources an whatever else for each language. Each dll should have same 'type' header file, which means each ID for the resource should be the same for each language. All your exe needs to do is load the appropriate dll for the specified language then use the string ID's as normal.
Is it possible you are forgetting to update the current windows when hot-switching between languages?
|
|
|
|
|
Thnx for the response...
jas tell me one simple thing...
This is my basic doubt
If I right click on a resource in the Resource view and then on 'Insert copy' and choose some other language...say German..then a copy of that resource will be added...but will it have be in English or German.....? Please do me the favor by checking this thing on ur machine...
On my VS 6.0...it always comes in English....they don't get translated to German on the fly...
All this while I do not change the language from Control Panel->Regional Setting n langs..to some other language...it is english...always...
And, wat language hot switching hve u referred to in ur response......?
Maybe, I am missing some locale setting change...
Thnx...
-- modified at 13:47 Thursday 1st February, 2007
...A Programmer may or may not be the master of the programming language grammar...
|
|
|
|