|
try this:
extern int Global1;
extern int Global2;
int Global1 = 0;
int Global2 = 0;
Software Zen: delete this;
|
|
|
|
|
I have written a COM component in VC++ that connects to a ODBC (.mdb file) through OLE DB. When i try to use it in .asp page i get error (0x80004005 - unspecified error). The same component (same asp file) works fine with PWS under Win98. When i run the same with IIS5 in Win2000 and WinXP i get error. I couldn't find out what might be the problem. Can you help me out?
Thanx in advance
Mahesh
|
|
|
|
|
That's because the connection string is different. The ADO/OLEDB section from the ASP documentation shows exactly what it expects.
PWS is a stripped down version of IIS and works with less stringent constraints. That's why it works with PWS.
|
|
|
|
|
Thanx Rod,
Actually i created the OLE DB connection using the 'Data Consumer ATL'. I look at it and try to fix it. Thanx once again.
Mahesh
|
|
|
|
|
Hi guys
i'm trying to get a listview full of thumbnails to load. kinda exactly like this tutorial:
http://www.codeproject.com/listctrl/thumbnailview.asp
only problem is, theres no source code provided, and i can't figure out what type his "m_imageList" class is
is it some kind of MFC listcontrol class? i can't use any stdfx stuff in my program, so if it is i'm screwd... if not where can i DL the code for the class
any help (soon) would be greatly appriciated!
-Mortis
|
|
|
|
|
D'oh
its looking like MFC, in that case, i'll change the question to:
does anyone know a simliar example in WIN32 API?
|
|
|
|
|
|
will do, thanks for the link
|
|
|
|
|
Hi.
Can anyone explain to me once and for all why do i see people write something like:
if (0==myVar)
{
...
}
instead of:
if (myVar==0)
{
...
}
what difference does it make ?
|
|
|
|
|
Simple. Your compiler will tell you if you type
if (0 = myVar)
whereas
if (myVar = 0 )
will compile and will always set myVar to 0 and evaluate to true.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Christian Graus wrote:
if (myVar = 0 )
will compile and will always set myVar to 0 and evaluate to true.
A typo, I guess Christian...
The value of the expression "A = B" is the value of A after the assignment, i.e. the value of B. Thus, "myVar = 0" evaluates to 0 and false.
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
both of you got it wrong...
i asked what is the difference between:
if (a==0)
{
}
and
if (0==a)
{
}
and not between:
if (a=0)
{
}
and
if (0=a)
{
}
(notice the extra = sign which makes a big difference)
|
|
|
|
|
Lior Shoval wrote:
both of you got it wrong...
i asked what is the difference between:
if (a==0)
{
}
and
if (0==a)
{
}
Christian did answer that one (although he rationalized a couple of '"''s off ). I merely made it clearer what a = 0 evaluates to.
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
checkout my reply to Johann and try to re-answer.
Thanks.
|
|
|
|
|
They did answer. If you get in the habit of always typing the constant first, the compiler will emit an error message when you mistakenly type one equals ('=') instead of two ('==').
Other than that, the only difference between (a == b) and (b == a) is the order of evaluation.
Software Zen: delete this;
|
|
|
|
|
Thanks.
I was under the impression that it had somthing to do with compiler or preprocessor optimizations...
|
|
|
|
|
That means, that using the first method is better to catch typos like "=" that act like assignments?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Yes. The people who use that method like it for that reason.
I don't use the method myself, since it reduces the readability of the conditional expression. For example, the expressions (x == 7) and (7 == x) evaluate the same and produce the same result. If you're reading the code, however, the first expression is read as "if x is equal to 7 " and the second expression is read as "if 7 is equal to x ". The reading of the second expression seems awkward to me. I prefer to think of testing a variable against a constant.
Software Zen: delete this;
|
|
|
|
|
I also prefer the second method (var == 0). dunno why, I just got used to it and find it easier to read.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have the same problem. It just feels more natural, and easer to read/write (x==7) instead of (7==x). But good habits (a.k.a constant==variable) are good habits. I keep trying to break this one, but habits are haibts.
Trust in the code Luke. Yea right!
|
|
|
|
|
Unless, of course, you use warning level 4, which will give the compiler warning "warning C4706: assignment within conditional expression" if you try to do if (myVar = 0) . This happened only in VC++ 5 or 6, I believe; before that, you had to do the if (0 = myVar) hack to get the compiler to complain.
Best wishes,
Hans
|
|
|
|
|
Hi,
Is there any tool which converts the .pdf file to .ppt file format?
|
|
|
|
|
No, given the nature of .pdf files. (you'll find tons of tools the other way).
The best way to achieve it though is to insert the Adobe ActiveX control in one of the slides.
|
|
|
|
|
Thanks for the reply.
Could you please tell me how to insert the Adobe ActiveX control in the slides?
|
|
|
|
|
Using the mouse and an empty .ppt file, it's Insert \ Object, then browse your folders and search for the AcroFx32.dll (or something like this).
To mimic exactly this by code, you can use the Powerpoint object model. (MSDN for more info).
|
|
|
|