I'm putting together a system that includes a client-side .exe that needs to be maintained automatically. I have a two-fold problems to this: 1) I need to be able to run the client side .exe. Is the only way to do this through an active x control or is there another way? I'm exploring options as I've never created an active x control. 2) Automatically updating the exe. I understand there is an MS tech called BITS that will acheive this, but it is limited to Win XP. I need to come up with an automated update systems that checks versions and if needed, notifies the user and automatically updates whatever is needed (files, the exe itself, configuration stuff, etc). What do you suggest I use to acheive this? Is there a way to easily incorporate something like ghost installer or am I going to have to write a custom module that performs this for me and embed it in the client exe? Any suggestions and insight are greatly appreciated as I am not well versed in what's available for web development. Thanks!
will1383
Posts
-
web to client exe communication and management -
CreateProcess problem and CString to char* conversionI'm trying to run a program using CreateProcess, but I am unable to run the program due to getting a 998 error, or an "Invalid access to memory location." error. I know the reason for this is because of how CreateProcess handles path names. Here's my call to CreateProcess: CreateProcess(appPath,cmdLineInfo,NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi); It should work like a charm, but the problem lies within the path specified in the appPath String. This is what is in the CString appPath: "C:\Directory_1\Directory secion 2\executable.exe" Create Process doesn't handle the seperated folder name properly. How can I correct this??? In addition: How do you convert a CString to a LPTSTR??? Any help is GREATLY appreciated. Thanks!
-
creating help filesAnyone know where I can find some good examples of software that uses context help? I'm trying to understand how to create help for a program I'm making, but MSDN doesn't really explain what needs to be done in a consise manner, and I have yet to find a place where a decent example exists. Any help in the matter is greatly appreciated. Thanks!
-
How to give high priority?SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
-
dll build problemI'm writing a dll and I want a .lib file to be produced. Problem is the file isn't being created. I have unchecked the "Doesn't produce .LIB" option under the Link tab in the project settings like I'm supposed to, but for some reason it still isn't producing the .lib and I don't remember how to fix this. So what do I need to do? I'm using VC++ 6.0 Thanks!
-
preventative directoriesThat's an interesting idea. One that I like. But the people upstairs seem to want to go against what windows does with every other application so I'm stuck trying to limit directory access at this open/save as level. Any other ideas? Other than creating an open/save as dialog from scratch which IMO makes no sense at all to re-invent the wheel :~ Thanks guys! I appreciate it! Dan
-
preventative directoriesSteve S wrote: You need to look at hook functions for common dialogs, specifically handling CDN_FOLDERCHANGE and/or CDN_SELCHANGE. Yup, been there done that. :~
-
excel automationObviously, you will need to use OLE to accomplish this. I can't really give you alot of information other than check out MSDN or look on code project for OLE interfaces. Hopefully that will help. Sorry I can't help more. I haven't done any of this in a while, and I used perl when I did. Good Luck!
-
preventative directoriesHi All, I'm implementing a CFileDialog open/save as application using 6.0. My problem is trying to prevent the user from browsing above a specific directory, but allow them to browse the directories below it. I've tried many different approaches, but I still can't get it to work. At the moment I'm capturing the OnFolderChange message, which is produced after the user changes the folder he/she is browsing. In that method, I'm checking the current directory, and if it is outside of my directory range, then I thought I could just set the current working directory to what I need it to be, and then force the application to redraw. Here's the code:
void CLibselformdlg::OnFolderChange() { char buffer[MAX_PATH]=""; DWORD tmp; ::GetCurrentDirectory(MAX_PATH,buffer); tmp = ::GetLastError(); IUXLogData("are you ready\n",TRACE1); if (strstr(buffer,"C:\\iux\\data") == NULL){ ::SetCurrentDirectory("\\iux\\data"); tmp = ::GetLastError(); this->Invalidate(); // need to reset the list view and the combobox view with the new (original) folder // then refresh the display here. //::SendMessage(this->m_hWnd,WM_ERASEBKGND,(WPARAM)::GetDC(this->m_hWnd),NULL); //::SendMessage(this->m_hWnd,WM_PAINT,(WPARAM)::GetDC(this->m_hWnd),NULL); //this->UpdateWindow(); } }
The SetCurrentDirectory I don't think works. The getlasterror returns a 183 after this function is run. You can see the different ways I've been trying to force the window to redraw with the new directory, but I'm not having any luck. Any Suggestions? :confused: Thanks alot! Dan -
CFileDialogHeath Stewart wrote: You might try the SHBrowserForFolder function instead :-( not exactly what I was looking for. I need the same look/feel as the FileOpen Dialog. Thanks for the hint though. I guess I just need to keep looking. Anyone else have an idea?
-
CFileDialogI'll give that a whirl. Thanks for the suggestion. probably not quite what I'm looking for but I might be able to make it work. I'll keep ya posted. thanks! :-D
-
CFileDialogHi All, I'm having a problem creating a custom dialog box. I need to limit the user to only be able to browse the folders below a certain folder. I'm trying to figure out how to trap the "Button Up" message on the toolbar properly so I can check the next folder going up and therefore prevent the user from going up any more directories. The problem is that no matter what I do, even in processing the up Button message and returning TRUE so the default windows doesn't process the message, the message still gets processed and the user is allowed to go up past my limit. I tried capturing the last message after the app gets updated, and then revert back to the limit folder, then signaling the window to update again as well. But that still didn't work. :confused: Any ideas? Thanks! Dan
-
CreateProcess errorHi everyone. I'm having a problem with the CreateProcess routine. I'm calling using the following: if (CreateProcess(cmdArg, cmdFileName, NULL, NULL, TRUE, DETACHED_PROCESS /*CREATE_NEW_CONSOLE */, NULL, NULL, &si, &pi) != 0){ CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } It works absolutely perfrect with the execption of one thing, the Application calling this doesn't return from the CreateProcess call until the process created returns. :confused: I really need the Call to return so I can shut down the calling Process after I'm done. I looked at using WinExec but that doesn't return either. What am I missing here? What method should I use? Thanks!
-
fwrite error???Ok, I did finally find it. Turned out that my global datasize number was being clobbered all the time, aka ending in a data size of 0 to be written. Thanks for all of your help! I REALLY appreciate it! Woo HOO!! Dan
-
fwrite error???ok pointers are all correct now, data is where I need it to be. But still, no data being written when calling the fwrite. :~
-
fwrite error???lol I just checked that and it seems my data pointer is not pointing to the right place. LOL. fix that and then try again. Thanks. I might be back. :-\
-
fwrite error???Why would this: fwrite(dataPtr,sizeof(unsigned char),(sizeof(unsigned char)*datalength),filePtr); ALWAYS return 0 byte written :confused: I can open the file ok using filePtr = fopen (DataFile,"wb"); but whenever I try to write the data down it fails. Anyideas? Thanks!
-
audio wave compressionanyone know where I can find some coded audio wave compression algorithms? I'm looking to implement a wave compression program and I've found a couple of algorithms, but I'm trying to find a coded example so that I have something to work from. It should include Predictor, Rice coding, and Lossless compression. any suggestions are greatly appreciated. thanks!
-
GetDocument in a dialog?Ooo. That's quick and easy. I like that! Thanks Dave!
-
GetDocument in a dialog?Mister Transistor wrote: CTransistDoc* pDoc = (CTransistDoc*) CLeftPaneView::GetDocument(); You are calling GetDocument as a static function (shown by the ::GetDocument). What you need to do here is get pointer to the class that contains the docuement, and call the GetDocument from that pointer. So it'd be something like this: CLeftPaneView *pLeftView; CTransistDoc *pDoc; CWnd* pWnd; pWnd = m_wndSplitter.GetPane(0, 1); pLeftView = DYNAMIC_DOWNCAST(CLeftPaneView, pWnd); pLeftView = pDoc->GetDocument(); This is how I get my document pointers in order to manipulate my docuement information. Hope this helps! :)