Hi, i have been playing around with NTFS reparse points and junctions. I finally found the tutorial by Mike Nordell and managed to make my application work. I can now build a junction to a path like "C:\mydirectory". My question is concerned with building junctions over the network. If i specify "\\ServerXYZ\mydirectory" as the target path, the DeviceIOControl() routine returns unsuccessfully and GetLastError() returns 4392, which means that the parameter structure must have an error. Something is wrong with the way i'm specifying the path! Is it possible to use the DeviceIOControl() routine setting a junction point that is located on another computer? Thanks in advance...
jason99
Posts
-
reparse points and junctions over network -
OnPaint vr. DrawItemHi, I'm currently creating a lot of ownerdrawn MFC-controls. Can anybody tell why i should use DrawItem() instead of OnPaint()?
-
reporting tool for VC++ 6.0Hi, I am looking for a reporting with certain abilities. I know and used Crystal Reports, but the reports are bound to a database. I would like to fill the data directly from my application. I tried Visual Reports, but i can't display a preview as a child window in my application dialog. I'd like to have an ActiveX View Component. Can anyone give me a hint? The tool should have: - A Report designer to design the report - A ActiveX Viewer component for application integration - The data shouln't come directly from a datatabase, i need to fill the data in myself from the application. greets, Jason
-
Internet Explorer style combo boxHi, I am trying to make a CComboBox behave like the Internet Explorer combo box, meaning: - The list opens and closes automatically, depending on the string the user is typing in - The String does not change when i'm browsing through the entries in the list box. Is it possible to make a standard combobox behave like this (Styles?)? Do I need to write a user defined class? greets, Jason
-
Returning a 2 dimensional array from functiontry char **function()
-
terminating thread in button on-eventOK, that is right. The first call to WaitForSingle object will surely return WAIT_TIMEOUT. But when the bool is switched, the loop in CAnyDlg::Thread() stops. This means that the created thread will terminate sometime later. From this point on, a continous call to WaitForSingleObject should return WAIT_OBJECT_0 after some time. But that doesn't happen. Tha fact that concerns me is that the code works if i take away the SetWindowText() in the thread or i i call PeekMessage in the WaitForSingleObject loop...this must have something to do with the message queue...
-
terminating thread in button on-eventHi Everyone, I implemente a thread in a MFC application that can be started and stopped through 2 buttons. My problem: After i click the Stop button, the while-loop doesn't break, meaning that WaitForSingleObject does never return WAIT_OBJECT_0. How can i terminate a thread like this using wait for single object? I noticed that some calls to PeekMessage inside the while loop make WaitForSingleObject return WAIT_OBJECT_0. I really don't understand why this isn't working! Please can anybody help?? Jason //------------------------------------------------------------------------- void CAnyDlg::OnStart() { // declarations DWORD dwId; // start the thread m_bThread=true; if(m_hThread=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)StartThread,(LPVOID)this,0,&dwId)) } //------------------------------------------------------------------------- void CAnyDlg::OnStop() { MSG msg; while(::WaitForSingleObject(m_hThread,100)!=WAIT_OBJECT_0)) { m_bThread=false; } } //------------------------------------------------------------------------- DWORD CAnyDlg::StartThread(LPVOID lpParam) { ((CAnyDlg*)lpParam)->Thread(); return 0; } //------------------------------------------------------------------------- void CAnyDlg::Thread() { while(m_bThread) { m_cstaAnyStatic.SetWindowText("Test"); } } //-------------------------------------------------------------------------
-
Operator Overloading TroublesHi Jeryth You cannot redefine the meaning of an operator when applied to built-in data types. Your SUIT enum is nothing but an ordinary int. I think that this is your problem... greets, Jason
-
memory allocation in CIn ansi C you allocate memory with malloc(); and after usage you free the allocated memory with free();
-
MP3 and WAV conversionHi, I'm currently writing some code for the manipulation of *.wav data and i want to use my algorithms for mp3 files too. I need something that loads a mp3 file to wav like uncompressed data. Something like: Function(char *cMP3FileName,void **DataBuffer,int *iBufLen,WAVHEADER *whHeader); can anyone give me a hint? greets, Jason
-
What's the point of BOOL?Hi, I'm not absolutely sure, but i think the 'bool' is not part of ansi C. This could be the reason why microsoft introduced the BOOL, and it makes perfect sense. If my assuption is correct, then the question is: Why the hell didn't they define BOOL as char instead of int? greets, Jason
-
Disable window close [X] buttontake a look at my homepage under: http://www.code-diary.com/HTML/Diary/0001.htm greets, Jason
-
directX8 draw textHi Mike, thanx, that was exactly what i was looking for. One last question: Is it possible to define the font type and the font size in the ID3DXFont interface? greets, Jason
-
directX8 draw textHi, Does anyone know how i can draw text on the client area of a window with the help of directX8? I know how to do it through the GDI, but i want to do it with directX8. Greets, jason
-
CString 2 integer and reverseAs i already wrote: if you are using the MFC CString class, simply use CString::Format(); else use sprintf(); examples: csCString.Format("%d",iInteger); or sprintf(cBuffer,"%d",iInteger); (where cBuffer is of type char*) greets, jason
-
CString 2 integer and reversetry this: iInteger=atoi(LPCTSTR(csCString)); iInteger++; csCString.Format("%d",iInteger); this should do it! greets, Jason
-
char[] problemmaybe the problem is the declaration of myfunc(), your upper code seems alright to me... is the declaration myfunc(char* c) ???? is the argument a pointer? greets, jason
-
Simple QuestionHi, Yes that should do it!
-
Simple QuestionThis can't work...you have to construct a compatible bitmap and select it into the memory DC. At the moment, you are simply drawing on "nothing"...and "nothing" is what you are bitblitting. greets, Jason
-
Use of class function in threadHi Tomaz, the problem is that CreateThread() is a c function...and c doesn't know anything about classes or virtual tables... try this: //--------------------------------------------------- void YourClass::AnyFunction() { // declarations DWORD dwId; // create the thread CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)StartAddress,(LPVOID)this,0,&dwId); } DWORD YourClass::StartAddress(LPVOID lpParam) { // call the thread function ((YourClass*)lpParam)->ThreadFunction(); } void YourClass::ThreadFunction() { ... } //--------------------------------------------------- in the header you should declare the thread start procedure as follows: static DWORD StartAddress(LPVOID lpParam); ..this should do it