|
Anonymous wrote:
I want someone to have gotten a memory dump and gone through and explained/showed where everything is.
Everything like what? I'm not sure of what benefit this would be since a memory snapshot will likely differ each time Windows is started. Windows does not load a program in the same location each time. It is all governed by what might already be at that spot. Windows will try to load a program based on an address contained within the EXE/DLL itself, but if something is already loaded in that spot, Windows has to dynamically re-base the program to start at some other unoccupied location.
Having said all that, is there something specific that you are after? Maybe a better solution is possible if given a clearer description of the problem.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi!!
I would liek toknow id VC++ supports any inbuilt function call to read the amount of memory or disk free space????
This value to be displayed on the VC++ Front end being developed.
Grace Sonal
|
|
|
|
|
|
Has anyone used the Image Mastering API (IMAPI)?
I can't get the Get / Set volume name to work. Here is my code for Get Volume name
CString Volume_Name;<br />
IPropertyStorage* Properties;<br />
PROPSPEC Property_Type[1];<br />
PROPVARIANT Property_Value[1];<br />
BOOL Result;<br />
<br />
Result = m_Joliet->GetJolietProperties(&Properties);<br />
if (Result)<br />
{<br />
Property_Type[0].ulKind = PRSPEC_LPWSTR;<br />
Property_Type[0].lpwstr = ::SysAllocString(L"VolumeName"); <br />
m_Result_Code = Properties->ReadMultiple(1, Property_Type, Property_Value);<br />
Result = SUCCEEDED(m_Result_Code);<br />
Volume_Name = (CString)Property_Value[0].bstrVal;<br />
}
Everything works. The result code is success, but the volume name is always an empty string.
Similarly the set volume name function succeeds, but the volume name of the CD burned is blank.
|
|
|
|
|
i have got two problems while working with a project.Somebody please help.
1) i want to display the continues screen image of the computer in my apllication.The continues screen image should should even include the mouse move.
2) i want to transfer this screen shots to another computer without any i/o operations such as saving to hardisk,So that he could monitor what's happening in the other computer.I am using the "CSocket" class for networking.
nav
|
|
|
|
|
Hi
I have work with fuzzy set project and i need some help for
how i can create inferance for fuzzy set
theroy in the c++ code .
plz any type of help about Fuzzy set can help me .
On Earth nothing impossible,
while your mind running.
Faroqtam
|
|
|
|
|
Hi,
I have a class CFixedDockBar derived from CDockBar, since I want to do some tiny changes to the algorithm of Layout. After that, I override the EnableDocking method since I want to use my new DockBar, in that method, I just substitue CDockBar with CFixedDockBar. Problems occur when i build the project, it says some linking error,
cannot resolve external symbol static unsigned long const (* CFrameWnd::dwDockBarMap)[2]" (?dwDockBarMap@CFrameWnd@@1QAY01$$CBKA)
Why is this happening? Do i need some extra libs?
thanks everybody
|
|
|
|
|
Hi
I have a problem with printing in a CRichEditView. I have a program that uses a CScrollView and there everything works fine. Both programs uses the same printingcode.
I´m not printing directly from the screen, I´m printing from a CStringArray, but this works fine in my other program so that shouldn´t be the problem.
For each side I´m printing the indent increases. This does not happen in printPreview mode. I can´t figure it out. Is there someone who recognices this problem.
I think I discovered where the problem lies. In my OnPrint when i call on CDC::LPtoDP(CRect), the CRect:s leftvalue doubles up in every call on OnPrint. Just before the call, the CRect:s left value is the same in all calls on OnPrint.
Thanx everybody
//Henrik
|
|
|
|
|
I would like to build three tier DB architecture using Web Services, and looking for convinient way to pass recordsets... So, how to transfer database data? Using SafeArray? Or i can use something else?
|
|
|
|
|
I have want to centralize the version numbering in my software. I have a central file called version.h which looks somthing like this:
#define MAJOR_VERSION 1
#define MINOR_VERSION 01 I then want to paste these tokens into my resource file. For example I want a string table entry in my resources which when evaluated turns into "MyApp Version 1.01". I imagined that somthing like this would work:
STRINGTABLE DISCARDABLE
BEGIN
IDS_SPLASH_HEADING "MyApp Version " #MAJOR_VERSION "." #MINOR_VERSION
END But it seems not to. Is there an easy way to accomplish this kind of thing? Is it possible to do it without screwing the resource editor up?
Joel Holdsworth
"Outlook not so good"
That magic 8-ball knows everything! I'll ask about Exchange Server next
|
|
|
|
|
I use a .h for version info and then use the #defs in the Version Resource as follows:
FILEVERSION 1,_SUL_VER_MINOR,_SUL_BUILD,_SUL_RBLD
PRODUCTVERSION 1,_SUL_VER_MINOR,0,0
VALUE "FileVersion", "1." _SUL_VER_MINORS "." _SUL_USER_BUILD "." _SUL_USER_RBLD "\0"
VALUE "ProductVersion", "1." _SUL_VER_MINORS " " _SUL_BUILD_DATE "\0"
and the .h for this:
#define _SUL_BUILD_DATE "16/12/2004" // rem: "dd/mm/yyy" If this format changes so must: <A HREF=".\ED_Install.cpp#App Release Date">
#define _SUL_VER_MINOR 30
#define _SUL_VER_MINORS "30"
#define _SUL_BUILD 0
#define _SUL_USER_BUILD "0"
#define _SUL_RBLD 0 //### See note above re: 2 digits except when leading 0. so 2.10 is right, 2.01 isn't. ###
#define _SUL_USER_RBLD "0"
The only hassle with this is that the VC6 Resource Editor occassionally looses the plot and the #defs in the VERSIONINFO get replaced by there literal values. I check this before each release and copy and paste the correct lines back in.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Neville Franks wrote:
The only hassle with this is that the VC6 Resource Editor occassionally looses the plot and the #defs in the VERSIONINFO get replaced by there literal values. I check this before each release and copy and paste the correct lines back in.
To correct this problem, create an external .RC file and include it in the main resource file, for example:
<br />
#include "Version.h"<br />
...
<br />
2 TEXTINCLUDE DISCARDABLE <br />
BEGIN<br />
"#include ""Version.h""\r\n"<br />
"\0"<br />
END<br />
...
<br />
3 TEXTINCLUDE DISCARDABLE <br />
BEGIN<br />
"#include ""version.rc"" // version resource\r\n"<br />
"\0"<br />
END<br />
...
<br />
#include "version.rc"
Your "version.rc" may contain a template version resouce and string table which can be shared across projects and it won't get corrupted when working with the main resource script. TEXTINCLUDE 2 and 3 give a way for including files in your resource and protecting the references from the rewriting that the resouce editor does.
|
|
|
|
|
The # operator only works within a #define , so you need to do something like:
#define MAJOR_VERSION 1
#define MINOR_VERSION 01
#define MAKESTRING(x) #x
STRINGTABLE DISCARDABLE
BEGIN
IDS_SPLASH_HEADING "MyApp Version " MAKESTRING(MAJOR_VERSION) "." MAKESTRING(MINOR_VERSION)
END
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
-----
Magnae clunes mihi placent, nec possum de hac re mentiri.
|
|
|
|
|
Hello,
I have two questions, one is more general and it's about diamond shpae inheritance, C,B inherit A virtually ans D inherits C and B.
a lot of people tell me to avoid diamond inheritance, but they don't know to explain the reasons. so that's the first question, does any one know problems that pop up when using that inheritance?
the socond question is about efficiency,
suppose I have class A, the class has a member variable "v" that can be only 2 values, the value doesn't change after A is allocated. now A has a function that returns '1' if "v"==something and '2' otherwise.
the question is what will be more efficient? to write the function using 'if' statement, or having two classes with virtual function.
to answer that assume that the function is called A LOT of times, but also there are A LOT of allocations of A (or the inherited classes).
thanks,
Guy.
|
|
|
|
|
1. well for C, B there won't be much trouble, it's actually D you have to take care of. Suppose that B and C both have a function called Print()? There 's probably a way to tell the compiler which one to use, but this isn't really O-O programming in my opinion, if your project gets more complicated in time you'll notice that you'll get more and more in trouble.
O-O => no multiple inheritance (as good practice)
If I understand what you mean I would go for the if-statement. It's simpler.
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
for the second question about efficiency try to write the funcion with inline assembler like this:
/////// header file ////////////
class A//suppose I have class A, the class has a member variable "v"
{
unsigned long v;//or long
long __fastcall func(void);//now A has a function that returns '1' if "v"==something and '2' otherwise.
long something;//it can be a local var of same type as v
};
/////////////// this is the cpp file //////////////////
__declspec(naked)long A::func(void)
{
__asm
{
push ebx //save ebx
mov ebx,1
mov eax,v
cmp eax,something //compare
mov eax,0
cmovne eax,ebx //if no equal, make eax=1 else eax=0
inc eax //increase eax
pop ebx
ret //eax is the return value
}
}
the return value of func will be 1 if equals or 2 if not.
regards.
Vagelis
|
|
|
|
|
me think the compiler will do something similar if you use simple code.
and in your example, you need to use another variable, which is not necessary.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hmm, thanks, but isn't it 'if' statement implemented in asm?
I wanted to know if the virtual functions table initialization tradeof is high or not.
thanks anyway,
Guy.
|
|
|
|
|
diamond inheritance is a problem when you have virtual methods; the derived class doesn't know which base class method to call.
about efficency, don't create a new class for nothing, a simple inline method will be enough, let the compiler do the job.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi!
i have got a Pointer to a window and want to get its toolbar.can anybody help me how to get toolbar from Window object.
|
|
|
|
|
One way is to use EnumChildWindows() and in the EnumChildProc() check the Window Style or Class to see if it is the Toolbar.
Another way is to use FindWindowEx() and specify the Toolbar class name.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Hi All,
I’m currently having trouble with inconsistent behavior some Win32 API BegingUpdateResource, UpdateResource and EndUpdateResource usage; which are used to manipulate resources in Win32 Binaries, below is a fuller description of the problem, could someone please help.
Development environment:
VC++, with Visual Studio .Net 2002, on Win2k (Service Pack 4)
Test environments:
WinXP, Win2K, WinNT
Problem description:
The assignment is in the translation domain, which requires updating resources in the Win32 binaries with translated text (in a language different from the original binary). In-order to achieve this we use the following Win32API: (FindResourceEx, LoadResource, LockResource …e.t.c to achieve this.)
Additionally this requires us to change the language ID of the resources contained, as there is no apparent method that would directly allow this, we chose the following approach:
We delete necessary resources using the API: (BeginUpdateResource, UpdateResource with NULL buffer and 0 size and EndUpdateResource)
And then update the
Following is a description of the issues/problems that I’ve encountered:
On deleting a single resource from a Win32Binary, I’ve observed that “sometimes” all resources are deleted (which reduces a source exe of 9MB, to 98KB destination exe).
This is typically the case for very large binary files, however, this is not very predictable, it seems to work fine on some boxes and not so well on some others, we are yet to conclude on the commonalities among the problem causing environments.
Below is a snippet of the code that I use to do this, could someone please help in pr
Code Snippet:
//Deleting resource(English):-
HANDLE hUpdateRes =
BeginUpdateResource((LPCWSTR)m_strDestFilePath.GetBuffer(), FALSE);
BOOL flgResultInt1 = FALSE;
long lBlockId = 100;
flgResultInt1 = UpdateResource(hUpdateRes, 0x05, MAKEINTRESOURCE(lBlockId), 1033, NULL, 0 );
BOOL flgRes = FALSE;
flgRes = EndUpdateResource(hUpdateRes, FALSE);
//Updating resource(Japanese):-
HANDLE hUpdateRes =
BeginUpdateResource((LPCWSTR)m_strDestFilePath.GetBuffer(), FALSE);
BOOL flgResultInt1 = FALSE;
long lBlockId = 100;
flgResultInt1 = UpdateResource(hUpdateRes, 0x05, MAKEINTRESOURCE(lBlockId), 1041, (LPVOID)buff, sizeof(buff) );
BOOL flgRes = FALSE;
flgRes = EndUpdateResource(hUpdateRes, FALSE);
Maharaj.M
|
|
|
|
|
MaharajM wrote:
BeginUpdateResource((LPCWSTR)m_strDestFilePath.GetBuffer(), FALSE);
...
BeginUpdateResource((LPCWSTR)m_strDestFilePath.GetBuffer(), FALSE);
Unless you are modifying the contents of m_strDestFilePath , the calls to GetBuffer() are unnecessary, and could potentially cause problems.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
i would like to know how to send midi data to the usb using windows midi driver???i have already sent this midi data to the midi sw synth(default of window midi player),how can i route it to the usb driver???i am not supposed to make my own driver but use the already existing windows drivers!!!!!.....
please help.....
|
|
|
|
|
Hello..
How do i import a third party libary (.lib) in Visual C++ .NET. I keep on getting the LNK2019 error during linking. I already added an entry on
Project->Properties->Linker->Advanced->Import Library = $Path\MyLib.lib..
I know this is pretty much the way to add libraries in VC++ 6...
But I still get the same error....
|
|
|
|
|