|
Have a look at the function FormatEx in fmifs.dll
I think there is (or at least, was) some article/sample at Systems Internals (http://www.sysinternals.com)
|
|
|
|
|
rajeevktripathi wrote: I want to make this dialog silent...
The format is controlled by the dialog interface. That is, the user must click the OK button to actually begin the format—the format cannot be started programmatically.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
Well, actually, it can. See my post. I have been using this func for ages in a program of mine. It even supports callbaks to a progress funtion (optional).
|
|
|
|
|
kakan wrote: Well, actually, it can.
SHFormatDrive() will always present a UI.
kakan wrote: See my post. I have been using this func for ages in a program of mine. It even supports callbaks to a progress funtion (optional).
The question, as well as my response, was regarding SHFormatDrive() , not FormatEx() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
Sorry, I misunderstood your post.
|
|
|
|
|
hi, im a mechanical engineering student and i've been given the task of calculating the second moment of area of three beams with different cross-sectional areas using the trapezium rule on c++ . i need the program to ask the user which cross-sectional area they want to calculate the SMOA for and use the corresponding data. the problem for me arises with the data for the heights and widths to be used as these are stored in txt files. the txt files contain a list of numbers: a single floating pt for the width, an integer, n, for the number of steps taken...which corresponds to the set of floating points which follow describing the height of the beam at these n points. i think i have to use an array to open and use the values, but one of the files has 20 values where the other two only have 10,(i.e.n=10 for two and n=20 for one) does anyone have any helpful hints for me? it would be very much appreciated!
thanks again
jo
-- modified at 11:14 Wednesday 22nd February, 2006
|
|
|
|
|
So your "width" text file has 20 values in it, and the "height" text file has 10 values in it. Is that correct? How about something like:
FILE *pFileHeight = fopen("height.txt", "r");
int nHeight[10],
x = 0;
while (! feof(pFileHeight))
{
fscanf("%d", &nHeight[x]);
x++;
}
fclose(pFileHeight);
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
|
You can use the macro
AfxGetMainWnd()
Have a nice code day
|
|
|
|
|
what are the lanuages that support dll?
JAYARAJ
|
|
|
|
|
Hi
Almost all languages in windows suport dll.
what do you do?
Agh
|
|
|
|
|
mehrdadov wrote: Almost all languages in windows suport dll.
What about Basic, Pascal and COBOL
"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
|
|
|
|
|
Hi,
Those all are having only header files, obj files, lib files, etc. I think those languanges are not supported library files[Dll's].
If any one given the information regarding this I appreciate it.
|
|
|
|
|
Hello Alok,
Do you know delphi & VB support dll. & delphi is visual pascal. same for Basic.
Regards,
Diyang Mithaiwala.
|
|
|
|
|
Divyang Mithaiwala wrote: Do you know delphi & VB support dll. & delphi is visual pascal. same for Basic.
Sorry to be sound rude, Did I Mention Visual with Basic and Visual With Pascal..also i mention about COBOL.. isn't you find any Visual COBOL for same?
"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
|
|
|
|
|
J5121982 wrote: what are the lanuages that support dll?
Languages.. are you talking about Computer Lanaguage supporting DLL .. or DLl Supporting multiple lanaguage
"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
|
|
|
|
|
Hi,
I have defined a call back:
typedef int (*GETHSPATTERNPPROC) (TCHAR **&, long&);
I am then loading the library:
DWORD hModSP = lpfnLoadLibraryEx32W("MyDLL", NULL, 0);
Getting the function pointer:
GETHSPATTERNPPROC hGetHSPatterns = (GETHSPATTERNPPROC)GetProcAddress32W(hModSP, "GetHSPatterns");
Then calling the method:
pchHSPaternNames = NULL;
lNumPaterns = 0;
CallProcEx32W(2, 1, (DWORD)hGetHSPatterns, (TCHAR FAR **)pchHSPaternNames, (DWORD)lNumPatterns);
In "MyDLL" I am doing:
lNumPatterns = GetPatNum();
pchHSPaternNames = new TCHAR* [lNumPatterns];
and here it fails.
What is going wrong????
|
|
|
|
|
|
I am running the application in 98, there it's showing the rundll32 error dialog and stopping,
|
|
|
|
|
indra20 wrote: DWORD hModSP = lpfnLoadLibraryEx32W("MyDLL", NULL, 0);
GETHSPATTERNPPROC hGetHSPatterns = (GETHSPATTERNPPROC)GetProcAddress32W(hModSP, "GetHSPatterns");
before using parameters like you do, ensure it is not null...
DWORD hModSP = lpfnLoadLibraryEx32W("MyDLL", NULL, 0);
if (!hModSP) {
GETHSPATTERNPPROC hGetHSPatterns = (GETHSPATTERNPPROC)GetProcAddress32W(hModSP, "GetHSPatterns");
if (!hGetHSPatterns) {
}
}
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
-- modified at 8:39 Wednesday 22nd February, 2006
|
|
|
|
|
thanks for the reply, yes i am having those checks in my code.
What I think is that the pointer TCHAR** pchHSPaternNames is not been passed correctly. Could you please confirm on that??
|
|
|
|
|
consider a class say 'ABC'
i want to create a list holding only the ABC pointer locations
then is the below the correct way of declaring it :
CList<ABC*,ABC*> x;
one more question:
if i were to declare it as
CList<ABC,ABC*> y;
,then how is the second different from the first delclaration?
-- modified at 5:58 Wednesday 22nd February, 2006
|
|
|
|
|
I don't know, and the MFC collections are confusing to use.
I think the first one is the only valid.
if you really have to guess about a declaration with MFC collections, then change to STL
std::list<abc> /// a list of ABC
or
std::list<abc*> /// a list of ABC*
it's much more clear.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
namaskaaram wrote: then is the below the correct way of declaring it :
CList<abc*,abc*> x;
That is one correct way, but certainly not the only way.
For the former:
ABC *a = new ABC(), *b;
x.AddHead(a);
POSITION pos = x.GetHeadPosition();
b = x.GetAt(pos); For the latter:
ABC a, *b;
x.AddHead(a);
POSITION pos = x.GetHeadPosition();
b = x.GetAt(pos);
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
that means the former Clist stores "the pointer locations"(and returns the pointer value) whereas the latter Clist stores the object itself(and returns the pointer of the object stored in the CList)!...is it?
|
|
|
|