|
Give me Haskell, where all data is immutable and we don't need to worry about passing things by value, reference, pointer or anything else - oh, and it's so lazy that it might just decide not to pass anything anyway, if it decides it's not required.
PS - thanks for explaining ref vs non-ref - I guess in C++ that is a reference to a pointer vs. a pointer?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: I guess in C++ that is a reference to a pointer vs. a pointer?
Yes a reference to a pointer (or a pointer to a pointer) vs a pointer.
BTW Real men (aka Klingon programmers), you know, don't use C++ or C# sissy features like references, they go straight with pointers.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
modified on Saturday, September 19, 2009 6:38 AM
|
|
|
|
|
Na - real men are programming in assembly, so it's all just (untyped) addresses...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Real men leave assembly to Rajesh's coding monkeys...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Possibly not, if they want it done right…
Sometimes (especially in an embedded world), assembly's the only way...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have an MFC dialog based application which calls CoCreateInstance() to create an instance of internet explorer.After Navigating to the html page I need to call a javascript function in my html page. But when calling GetIdsOfNames through the dispatch interface I get DISP_E_UNKNOWNNAME error.can any one suggest me I get this error.
MOHANRAJ
|
|
|
|
|
Well, that says you're accessing a name that doesn't exist...but what name are you looking for , and which object are you querying for that name?
Give some detail, man!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
From MSDN [^]:
An IDispatch implementation can associate any positive integer ID value with a given name. Zero is reserved for the default, or Value property; -1 is reserved to indicate an unknown name; and other negative values are defined for other purposes. For example, if GetIDsOfNames is called, and the implementation does not recognize one or more of the names, it returns DISP_E_UNKNOWNNAME, and the rgDispId array contains DISPID_UNKNOWN for the entries that correspond to the unknown names.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi, all
I have a problem during applying custom visual-style to my mfc application.
I want to apply custom style from my ShellStyle.dll file, (not from the default %windir%/shellstyle.dll)
How can I avoid the loading of system file to load my custom file as visual style for my application ?
Thanks in advance,
themilan
|
|
|
|
|
Howdy,
I've never seen any mention of specifying a different DLL file to be used by windows to draw your app.
I've seen instances of people using the DrawThemeXXXXXXXX() functions found in uxtheme.h & UxTheme.dll,
though have never been able to see a possible way to load your own theme data.
Reading from "http://msdn.microsoft.com/en-us/library/bb762202(VS.85).aspx": SHGetShellStyleHInstance first attempts to load the version of Shellstyle.dll from the current active visual style. If that is unsuccessful, the version stored in the System32 directory is used.(EDIT: however, that function is deprecated after winXP sp2, so that rules out placing a hook on the function and returning a handle to your own DLL)
In short, the only way I've ever themed applications is myself, the hard-way. I.e define all of the bitmaps to be used for your window edges/features/controls etc and then code in the rules that define how they'll be applied (think about the 'behaviour' of WMP11 as it's resized)
Of course, you could just search for one of the many styling libraries out there. There's a great one floating around here somewhere. I think it's called the StyleToolkit by (Darren Sessions)
Here: 'ave a look at this: http://www.codeproject.com/KB/GDI-plus/Style_Toolkit.aspx
|
|
|
|
|
Thanks to 'enhzflep' for the reply,
I also want to know that, how can I hook system function to avoid returning of system dll by supplying my custom dll handle ?
From,
themilan.
|
|
|
|
|
Hello
I have a code where 2 double data types are added,
double = double1 + double2;
I am purposefuly not declaring a variable of type double and writing
what the issue am facing is,
sometime the double2 becomes negative. but i want to ignore the negative and just ad the 2 numbers.
so can i do like,
double = double +- double2;
Let me know.
|
|
|
|
|
I believe what you are looking for is abs , that will give you the "absolute value" of whatever you feed it, so if your value is 123, it will give you 123, if it is -321, it will give you 321. Is that what you want?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
modified on Friday, September 18, 2009 8:47 AM
|
|
|
|
|
Ya i want to avoid the negative that sometimes comes up with double2.
so how to do that programmatically?
can you show a sample code?
so does that mean, there is a better way to do that, rather than doing,
double = double1 +- double2; ?????
|
|
|
|
|
This:
dipuks wrote: double = double1 +- double2;
translates into this:
double = double1 + (-1 * double2);
Thus, it will turn your negative double2 to positive BUT it will also turn positive double2 to negative which is i supose not what you want.
But this:
double = double1 + abs(double2);
will ALWAYS work with a "positive double2 ".
You could also do this:
double = double1 + ((double2 > 0)?double2:-double2)
or
if (double2 > 0) double = double1 + double2;<br />
else double = double1 + -double2;
or
if (double2 > 0) double = double1 + double2;<br />
else double = double1 - double2;
Or i don't understand what you want to do.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
dipuks wrote: so how to do that programmatically?
can you show a sample code?
Isn't that what the reference to abs() was for?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hai all ,
I am using NetuseAdd() function for that I have to link to netapi32.lib ,
but i am unable to download it ,
please can any one help me?
ranjith
|
|
|
|
|
Why do you want to download it independantly ? It should be part of the platform SDK. Did you download the PlatformSDK ? Which version of Visual studio are you using ?
|
|
|
|
|
I am using vs 6.0(vc++)
Thanks
Ranjith
|
|
|
|
|
Which version of Windows are you targeting? This API is present only in Windows 2000 or above. You must ensure to define _WIN32_WINNT and WINVER to something that's above 0x500 (Windows 2000 or above) to have this API available to be used from your code.
Are you using a really OLD SDK?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Download the platform SDK from the microsoft site and integrate it to visual studio.
if you are using VS 6, you have to download platform SDK 2003[^]
If you are using any latest version of visual studio, better download the latest SDK[^]
|
|
|
|
|
Naveen wrote: If you are using any latest version of visual studio, better download the latest SDK[^]
Actually, the latest sdk is here[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
ha...Thanks
I actually checked for a latest SDK than SDK 2008 by googling "SDK 2009". which didnt give me a valid result. Now only I came to know that, they changed the convension of post fixing the year with the SDK name .
|
|
|
|
|
I am using windows XP(vs 6) as a client and windows server2003 as a server.
I have to access the shared folder from server to client without authentication(I have to authenticate thgough the program).
Thanks
ranjith
|
|
|
|