|
i have made myself up between the controversial point of view and the collective blindness. the tool you refer to is a good example of what you MS supporters are actually leading to. you don't have to mind, though.
|
|
|
|
|
I wasn't trying to insult you by saying you were "controversial". I respect your work as an author, and your tool is quite nice.
Chris Richardson
Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith
|
|
|
|
|
hi,
i am developing a sw on win2000 using vcpp6.for it to be ,
portable across win 95/98/me and nt(not so keen) what should i do?
i mean,generally,if i compile it on 95 ,it wont run on 2000 at all.so should i build it on 2000?
specifically,the CEdit::GetLine() doesnot seem to put the null char at the end of the array in 95/98.this results in something like this which makes it impossible to parse the line.
if the lines are
comments
[tag]
123
234
345
[tag]
the array is read as follows
comments
[tag]ents
123g]ents
.
.
.
why?how to solve this?
any help is appeciated.
Ian
|
|
|
|
|
It's not a cross-OS issue. From the remarks to CEdit::GetLine[^]: "Call this function to retrieve a line of text from an edit control and places it in lpszBuffer. The copied line does not contain a null-termination character. For more information, see EM_GETLINE in the Win32 documentation."
So, I'd use a combination of CEdit::GetLine() and CEdit::LineLength()[^] to parse your input.
|
|
|
|
|
Other remarks: WinNT / 2k / XP support ANSI versions of the runtime libraries that support MFC, but you're better off doing native Unicode if you target WinNT or higher, so using the TCHAR macros (LPTSTR, LPCTSTR, TCHAR, and _T) are a good idea. See Unicode Programming Tasks[^] for doing unicode.
|
|
|
|
|
one theoretical question:
how does IIS works, in regards to processes and threads?
when a HTTP request comes in, IIS process inetinfo.exe will launch a thread to parse an ASP file (ie. the newly spawn thread will feed an ASP page to the script engine)
say there're 100 concurrent requests, InetInfo.exe will spin up 100 threads, each will load and feed a page to the script engine.
Is this correct?
And since it's "threads" as opposed to "processes", if these threads crash, it will bring down the entire server? prolly not? i read something about process and fault isolation.
tell me what i'm missing here. since i need to understand how an "ASP application" loads and instantiate my COM server...(i interpret an ASP application as a thread that parse an ASP script).
btw, it's a MTA(both) + inprocess dll server
norm
|
|
|
|
|
To quote an MSDN article:
"IIS uses an I/O thread pool to process all incoming requests. Requests for static files (.htm, .jpg, etc.) are satisfied immediately, while requests for dynamic content are dispatched to the appropriate ISAPI extension DLL. The Active Server Pages extension uses a worker thread pool to execute ASP pages. Because ASP is COM-based, all sorts of components end up executing in our process. This is a mixed blessing. It's wonderful for developers, because it allows easy reuse of components, makes ASP marvelously flexible, and has made ASP and IIS a big success. However, this flexibility has caused us performance problems. Many of these components were written for the desktop, and many of the components created specifically for ASP were written by people who don't fully understand what it takes to write a high-performance server component.
The same is often true for ISAPI extensions and filters; the components interact badly with other components and they interact badly with different instances of themselves.
All of the following apply to IIS; most of them apply to other kinds of server applications too."
See Server Performance and Scalability Killers[^]
With IIS, you can set up your ASP application to run in various "modes" of safety. Usually, I opt to run applications isolated, which means IIS launches the ASP app in it's own process so you won't kill the server if things go amok.
The article link above should give you a good start, as well as this one: Agility in Server Components[^]
|
|
|
|
|
hi
i want to change the looks of frame window i.e having a frame window tht looks diff fom the normal stuff ,say color diff frm the gray ifault color, sort of a new skin.
any one knws how can i do it in VC++,whch mssg to handle etc
THnx for any help:;)
bye
|
|
|
|
|
You could begin by intercepting the WM_NCPAINT message in the mainwindow and do your drawing there. There you would create a CWindowDC object and use that for your drawing.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
i m swaping values of two variables without using any pointer,variable or any function , just two varaible that store numbers , i m using c++ , any help
|
|
|
|
|
[Edit] Used AND instead of XOR. Much too early in the morning for coding.. [/Edit]
x = x^y;
y = x^y;
x = x^y;
Simplified:
x^=y^=x^=y;
Its magic...
/moliate
The corners of my eyes catch hasty, bloodless motion -
a mouse?
Well, certainly a peripheral of some kind.
Neil Gaiman - Cold Colours
|
|
|
|
|
quite logical, smart ass
|
|
|
|
|
Norm Almond wrote:
quite logical, smart ass
Yeah, and really useful. I mean, who can afford to use a temporary variable these days with only 2GB of virtual usermode memory available?
/moliate
The corners of my eyes catch hasty, bloodless motion -
a mouse?
Well, certainly a peripheral of some kind.
Neil Gaiman - Cold Colours
|
|
|
|
|
Just a couple thoughts...
I profiled this once and found out that using a tempory variable is much quicker for x86 based processors. I have seen too many people use "x^=y^=x^=y;" in their code because they think it is somehow more efficient. Also, using a temporary variable makes code clearer for those who don't know that "x^=y^=x^=y;" swaps two values.
- Kevin
|
|
|
|
|
The question seemed to be how to do the swap whitout using a secondary variable. Personally I prefer a temporary variable and use the XOR method in heavy recursion situations only.
I agree that "x^=y^=x^=y;" seems more like a method of exaggerate ones technical knowleadge than a useful technique - thus the "magic" comment.
Cheers
/moliate
The corners of my eyes catch hasty, bloodless motion -
a mouse?
Well, certainly a peripheral of some kind.
Neil Gaiman - Cold Colours
|
|
|
|
|
How to detect if a window is being minimized?
WM_ACTIVATE only seems to say if it's leaving minimized mode + just normal (de)activation.
|
|
|
|
|
Take a look at the WM_SYSCOMMAND message. If the wParam parameter is SC_MINIMIZE , then the window is about to be minimized.
|
|
|
|
|
Try using the Spy++ utility (found in the VC6 pkg). It's useful for watching the messages that go by when a user action takes place.
Software Zen: delete this;
|
|
|
|
|
I've tried the code on MSDN but that doesen't give me any filters. I was told it may be because i hadn't performed a RenderFile action on the IGraphBuilder. But isn't there another way of just enumerating all the available filters on the system? Here's my code, when it comes to the pEnum->Next procedure for the first time, it returns S_FALSE which means that the number of filters requested couldn't be found.
IGraphBuilder *pGraph = NULL;
IEnumFilters *pEnum = NULL;
IBaseFilter *pFilter = NULL;
ULONG cFetched;
CoInitialize(NULL);
CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder,(void**)&pGraph);
pGraph->EnumFilters(&pEnum);
while((err = pEnum->Next(1, &pFilter, &cFetched)) == S_OK)
{
FILTER_INFO fiFilterInfo;
char szFilterName[256];
pFilter->QueryFilterInfo(&fiFilterInfo);
WideCharToMultiByte(CP_ACP, 0, fiFilterInfo.achName, -1, szFilterName, 256, 0, 0);
SendMessage(GetDlgItem(ghWnd, IDC_FILTERS), LB_INSERTSTRING, -1, (LPARAM)szFilterName);
fiFilterInfo.pGraph->Release();
pFilter->Release();
}
pEnum->Release();
pGraph->Release();
CoUninitialize();
So i'm asking if there's a way to enumerate all the available filters on the system.
All help appreciated
-Rune Svendsen
|
|
|
|
|
The code you've got lists the filters of an empty IGraphBuilder (that is, none). RenderFile fills that IGraphBuilder with the filters necessary to render a given file. As for enumerating all the filters present in the system, check MSDN article Using the System Device Enumerator[^] (provides samples).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thankyou. Do you know how i add a filter to IFilterGraph if i only know the name of the filter?
-Rune Svendsen
|
|
|
|
|
Using VC6 it was easily possible to create a MFC-VC6 appl. and link MFC statically. The apps only depended on Kernel32.dll, User32.dll,...
Doing the same with VC7 or even converting such a project from VC6 to VC7 results in additional dependencies to SHLWAPI.dll, OELAUT.dll and OLEACC.dll.
How can I remove the dependencies to these DLLs, even linking with /opt:ref /opt:noicf doesn't help.
Any idea on howto make VC7 work like VC6 in this aspect is very much appreciated.
Rainer
|
|
|
|
|
Rainer
i too have noticed those dependencies, but don't think shlwapi and oleaut create particular problems
as far as oleacc.dll i suggest you to check out:
http://www.codeproject.com/cpp/oleaccproxy.asp[^]
basically an oleproxy or, better, a delayed loading dll, seems to be a recommended practice
maybe you could use this way also with the other 2 dlls
hope this helps
best regards
|
|
|
|
|
This helps
thank you
Rainer
|
|
|
|
|
How can I draw a transparent Icon without using DrawIcon function. I don’t want to use DrawIcon because it didn’t limit the width and height of the Icon in the DC. So I need a method that can draw a transparent icon within certain width and height.
Thank you
|
|
|
|