|
rajeevktripathi wrote:
What is the path where registry entries are stored?
%windir%\system.dat
%windir%\user.dat
Your explorer may not show it by default unless you set to view hidden and system files through folder options-View
suhredayan There is no spoon.
|
|
|
|
|
suhredayan® wrote:
%windir%\system.dat
%windir%\user.dat
I can't find these files in my Computer.. my OS: Windows 2000 professional
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote:
I can't find these files in my Computer.. my OS: Windows 2000 professional
For win2000 it seems to be in a different way.
Hope this[^] link helps.
suhredayan There is no spoon.
-- modified at 8:25 Wednesday 14th September, 2005
|
|
|
|
|
Thanks for these replies......
Infact now I am able to read & enumerate all the sub keys and also data value.
Now the problem is that how could I save it to a file (as regedit editor shows) and again restore it to its original location?
Please reply.
Once agin thanks.
|
|
|
|
|
rajeevktripathi wrote:
Now the problem is that how could I save it to a file (as regedit editor shows) and again restore it to its original location?
Use RegSaveKey() and RegRestoreKey() for this.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Look in your C:\Documents and Settings\ folder.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
Look in your C:\Documents and Settings\ folder.
Is it ntuser.dat file
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks for these replies
Please tell me that how could I take bake up of registry and again restore it,
Please reply.
Thanks & Regards
|
|
|
|
|
ThatsAlok wrote:
Is it ntuser.dat file
Of course. What did you expect with Windows 2000 Pro? Those other .dat files you referenced are for Windows 9x and Me.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
Of course. What did you expect with Windows 2000 Pro?
thanks, Sir, could you provide me any link demonstarting the structure of registry stored in dat file.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Funny you should ask. I just read such a magazine article just a few weeks ago that went into painful detail how the registry was laid out. Unfortunately, I can't find that magazine. I've looked through all of my magazines and my browser history but I can't find it. That's so aggravating. If I stumble across it in the future, I'll let you know.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
f I stumble across it in the future, I'll let you know.
I will Wait
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I am creating a service which tries to access some files on a remote computer.
But seems my service has not right to access the files.
Can anybody suggest a method to solve this problem or give me some sample to refer to?
thanks in advance~
|
|
|
|
|
By default any service is registered to run as a special user called "SYSTEM", but this user does not have access to network resource. So you can register your service to run as a different user when you create it using CreateService(). the following two parameters of the function will do the trick I guess.
LPCTSTR lpServiceStartName,
LPCTSTR lpPassword
Otherwise you can manually change the user name after its created also using SCM->"Your Service"->Properties->Log on->This Account.
suhredayan There is no spoon.
|
|
|
|
|
I developed one Schduler application ,
In which I used OnTimer() function to popup the messages to
a particular given time.
Cursor is blinking when the application is running.
When I move the cursor on to appli it is blinking .
Plz Give Solution very Urgently.
Praveen Chowdam Kumar
|
|
|
|
|
Can you show code of OnTimer and OnPaint with details?
|
|
|
|
|
n
CString sql,sDate;
/*CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)";
CMyTabExampleApp *pApp = (CMyTabExampleApp *)AfxGetApp();
*/
CDatabase db;
db.OpenEx("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\mydabase.mdb;DSN=MyDsnName",CDatabase::noOdbcDialog);
CRecordset recset( &db);
CTime t;
CTime s=t.GetCurrentTime();
CString strDate,strTime;
strDate.Format("%d-%d-%d",s.GetDay(),s.GetMonth(),s.GetYear());
strTime.Format("%d:%d:%d",s.GetHour(),s.GetMinute(),s.GetSecond());
sql = "select TaskType, TaskDetails, StartDate,SnoozeTime from mytable where StartDate ='"+strDate+"' and SnoozeTime = '"+strTime+"'";
recset.Open(CRecordset::forwardOnly,sql,CRecordset::dynaset);
//MessageBox("READING DB");
CString tasktype,taskdetails;
while(!recset.IsEOF())
{
recset.GetFieldValue("TaskType",tasktype);
recset.GetFieldValue("TaskDetails",taskdetails);
recset.MoveNext();
MessageBox(tasktype + "\n\n"+ taskdetails);
if(tasktype=="APPLICATION")
{
CSnoozeAppli objappli;
objappli.sTaskDetails = taskdetails;
objappli.DoModal ();
}
else
{
CSnoozeMsg dlg;
dlg.sTaskDetails =taskdetails;
dlg.DoModal();
}
}
db.Close();
SetTimer(100,1000,NULL);
CDialog::OnTimer(nIDEvent);
Praveen
|
|
|
|
|
I have application that scans for files (exe's and dll's) and looks up thei import table.
I have managed to see what functions they import with IMAGE_NT_HEADERS IMAGE_IMPORT_HEADERS IMAGE_THUNK_DATA.
i compare the c***ion pointer from
pThunk->u1.FisrtFunction with my function loaded with GetProcaAdress()
it works fine but how do I get the function name from IMAGE_THUNK_DATA structure
i've tried
WORD hint=(WORD)&pThunk[l]->u1.AddressOfData->Hint;
PSTR FNAME=(PSTR)((BYTE *)hMod+pThunk[l]->u1.AddressOfData->Name[hint]);
doesn't work what is the correct combination ?
gabby
|
|
|
|
|
Respected All
I already sent my query to this forum but still no +ve response.I cant sent Source Code because too lengthy.
------------------------------------------------------------------
Actually I have a number of bitmaps that are listed in a ListBox, when i executed my program then on first Dialog Box a listBox came in and i select any one bitmap from the list and the bitmap displayed along with respective data on Bitmap on different position usind dc.textout()function in 2nd dialog box which i have already created.
Now when I close the 2nd dialog window then the first still exist there and I can select another bitmap to display but when i select another bitmap from the listbox then the selected bitmap has been displayed but the respective data that should be displayed on different position can't dispalyed and show an error that debug it.
I did not load bitmap in OnPaint() function but actually i am loading in 2nd class.
Hope my expalnation will help u people.
david
|
|
|
|
|
Handle the WM_CLOSE message of the second dialog. Just Hide the dialog instead of destroying it, like: ShowWindow(SW_HIDE); Also handle the OnOK() and OnCancel() functions, so that the dialog cannot be destroyed.
Create the second dialog in the OnInitDialog() of the first dialog. Keep the handle of the second dialog as a member variable in the first class, like:
CSecondDialog m_SecondDialog;
In the OnInitDialog() of the first:
m_SecondDialog.Create(IDD_WHATEVER,this);
When you need to show the second dialog, just show it:
m_SecondDialog.ShowWindow(SW_SHOW);
this is this.
|
|
|
|
|
Hi!
I'm trying to find an article of any good example of how to implement a drag and drop Button Control. I want this button to be dragged and across the Dialog and then dropped on another buttun which generates a MessageBox saying that Drag And Drop works. Should be simple but I can't find any good information or anyone that can help me out.
Maybe dragging and dropping an image would make it more simple.
Or any other type of Control.
Every example I get, is of dragging items in a TreeCtrl or just text in an Edit Control. I want the whole Control to be dragged.
Please Help!
|
|
|
|
|
Hello...
I like to implement WriteFileEx / ReadFileEx in one of my classes...
Is there any safe way to implement LPOVERLAPPED_COMPLETION_ROUTINE as a (non static) member function ?
Thx...
-- modified at 5:09 Wednesday 14th September, 2005
|
|
|
|
|
Off the top of my head (i.e. untested) do something like this:
#define IOOP_READ 1
#define IOOP_WRITE 2
#define CK_CONTAINING_RECORD( PTR, TYP, FLD ) \
( (TYP*)( (byte*)(PTR) - (byte*)(&((TYP*)0)->FLD) ) )
class MyFile;
class MyOL : public OVERLAPPED {
public:
virtual ~MyOL( void ) {
if( Buff ) delete [] Buff;
}
MyFile *File;
DWORD Op;
DWORD Cnt;
char *Buff;
OVERLAPPED Ptr( void ) { return(&Internal); }
};
class MyFile {
protected:
HANDLE hnd;
static void CALLBACK iocr( DWORD ERR, DWORD CNT, OVERLAPPED *OL ) {
if( !OL ) return;
MyOL *ol = CK_CONTAINING_RECORD(OL, MyOL, Internal);
ol->Cnt = CNT;
ol->File->OnIOC(ol);
delete ol;
}
void onIOC( MyOL *OL ) {
switch( OL->Op ) {
case IOOP_READ : ...
case IOOP_WRITE : ...
}
}
public:
bool ReadEx( DWORD SZ ) {
if( !SZ ) return(false);
MyOL *ol = new MyOL();
ol->Op = IOOP_READ;
ol->File = this;
ol->Buff = new char[SZ];
return( ReadFileEx(hnd, ol->Buff, SZ, ol->Ptr(), iocr) );
}
bool WriteEx( DWORD SZ, void *BUFF ) {
if( !SZ || !BUFF ) return(false);
MyOL *ol = new MyOL();
ol->Op = IOOP_WRITE;
ol->File = this;
ol->Buff = new char[SZ];
memcpy(ol->Buff, BUFF, SZ);
return( WriteFileEx(hnd, ol->Buff, SZ, ol->Ptr(), iocr) );
}
};
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hello...
This is very guru like solution...
Big Thx, greets from germany...
|
|
|
|
|
Hi,
I hope someone can help me with the following problem:
I have to download several web pages and search for a special number or text in this sites.
If the number or the text is found, the adress of the page should be displayed.
So, now my problem is that I don't know how to download a page? Does anyone have a sample?
The other problem is that before this web pages can be displayed in IE or Firefox you have to enter a username and password!
Regards,
Daniel.
--
FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE.
|
|
|
|