|
midl\oleaut32.dll : error MIDL2020 : error generating type library : LayOut failed : NSMyInterface(0x80029C83)
Error executing midl.exe.
is it a bug of microsoft platform sdk? should i update my sdk?
i'm using win2003 sp1 ,PSDK 2003 Feb
|
|
|
|
|
MIDL2020 seems to be a catch-all error, that is, it may be caused by a number of different reasons.
Maybe this[^] can be of help. Or maybe not.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Is there anyway of getting the current directory in unix? _getcwd(...) doesn't compile in unix.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
|
Ravi Bhavnani wrote:
How about getcwd()?
Same, because the compiler complains it couldn't find direct.h which it needed for _getcdw() or getcdw()
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Weiye Chen wrote:
the compiler complains it couldn't find direct.h
That would lead me to believe there's a problem in your #include search path. Try #include <unistd.h> and see if that helps.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
Try #include <unistd.h>
Ah, now it works perfectly on unix using getcdw(...) . But the strange thing is, VS complains it couldn't find that.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Weiye Chen wrote:
But the strange thing is,
It's not strange - the UNIX manual states you need to include <unistd.h> while the Microsoft docs state you need to include <direct.h> .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hee, i am new to unix environment. :-> Anyway, thanks for the help.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
|
I'm creating a plugin for Enterprise Manager's Stored Procedure dialog box to enable it to have "Find Text" capability.
If you've seen this text box that contains the SQL Stored Procedure text, you'll know that it highlights certain key input text. So it's handling is slightly different than your average EditBox or RichTextBox control.
I have found that this "DimensionEdit" object (the name of that text box control class), does NOT respond to any EM_* windows messages (eg. EM_SETSEL). It does, however, respond to general WM_GETTEXT and WM_SETTEXT messages.
The funny thing is, it sort of acts like a RichTextBox control. When i'm in the Enterprise Manager program, I can select text in it and it will be highlighted correctly. BUT i want to be able to highlight text from an external application by passing windows messages.
This "DimensionEdit" object may have its own custom message handling. I've searched everywhere for what this object is and can't find any info on it. A clumsy way to do this would be to set the font of the 'found' text. But that is just a workaround.
So... if you can select the text manually in the program, then why can't i send a message to the control (via external app with SendMessage) to do the same??
Any ideas are GREATLY appreciated!
|
|
|
|
|
Anyone have any ideas?
|
|
|
|
|
For the InitializeCriticalSection LeaveCriticalSection, can more than one thread, at the same time, calling them on a same CRITICAL_SECTION structure?
If not, do I have to lock the InitializeCriticalSection and LeaveCriticalSection by using another CRITICAL_SECTION?
|
|
|
|
|
Interesting. One approach is to initialize the critical section to NULL. If you have pointers to the same raw object, then look for NULL.
Kuphryn
|
|
|
|
|
InitializeCriticalSection should be called only once by the process before the threads can use it. Those threads shouldn't call InitializeCriticalSection , but rather EnterCriticalSection or TryEnterCriticalSection in order to gain the ownership of the critical section (which may imply waiting for some other thread to release it). Once a thread obtained ownership of the critical section, and after using it, it should call LeaveCriticalSection to release it. No more than one thread will call LeaveCriticalSection at the same time, because only one thread can own the critical section at the same time (that's why they are using a critical section in the first place ).
More info can be found here[^] and here[^].
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
|
Hi,
I'm developing a namespace extension and it's going pretty well,
I've created my own shell folder and I use ShCreateFolderView to create the view.
Everything works fine, but when I try to doubleclick on one of the items, which I've given the browsable and folder flag, nothing happens!
Do I need to respond to some kind of notification for this to work? Or is there some interface I should use?
I've tried to use the IDataObject to hand back the pidl of the item, but didn't work,...
Thanks in advance...
"There is an empty room full of people who think you are creative"
|
|
|
|
|
I am trying to analyse this piece of C++ code below. It is an example code from qwt.sf.net which is an extension to QT graphics library.
I assume line 03 is calling a constructor? I have never seen it written this way. Is this a new syntax in C++? Same again in line 12. Are QApplication & QString constructors? While a & info are the references to the new constructed objects? And wtf is going on in line 14? Please can someone explain what is going on.... :S
[code]
01. int main(int argc, char **argv)
02. {
03. QApplication a(argc, argv);
04.
05. QVBox vBox;
06. vBox.setCaption("Cpu Plot");
07.
08. CpuPlot *plot = new CpuPlot(&vBox);
09. plot->setTitle("History");
10. plot->setMargin(5);
11.
12. QString info("Press the legend to en/disable a curve");
13.
14. (void)new QLabel(info, &vBox);
15. a.setMainWidget(&vBox);
16.
17. vBox.resize(500,300);
18. vBox.show();
19.
20. return a.exec();
21. }
[/code]
PS: If you are interested in seeing more, download qwt.sf.net
|
|
|
|
|
Line 14 is a call to the class's constructor. Just like Java yes?
Why couldn't line 01 do QApplication a = new QApplication(argc, argv); and line 12 do QString info = new QString("Press the legend to en/disable a curve"); ? Or are they just the same as line 14's way of creating an object?
|
|
|
|
|
kevingpo wrote:
Why couldn't line 01 do QApplication a = new QApplication(argc, argv);
Of course it could, but it is not the same thing.
I suggest you read some book on C++ before analyzing that code
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
kevingpo wrote:
I assume line 03 is calling a constructor
On line 03, object a is created on stack, initialized with argc and argv
kevingpo wrote:
Is this a new syntax in C++?
Nope, always been that way. You must be coming from Java or C# backgrond, right?
kevingpo wrote:
Are QApplication & QString constructors?
They are types.
kevingpo wrote:
And wtf is going on in line 14
That's a strange one indeed - an object of class QLabel is created on the heap, but without any pointer or reference to it. I wild-guess that vBox takes ownership of it, or you would have a memory leak otherwise.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
kevingpo wrote:
I assume line 03 is calling a constructor?
right
these two lines above are doing the same thing :
QApplication a(argc, argv);
QApplication a = QApplication(argc, argv);
the only difference is the first one is calling the constructor implicitely, when the second one doesn't. when a constructor is declared as explicit , you cannot call it with the first way...
kevingpo wrote:
Are QApplication & QString constructors?
in C++, the constructor must have the same name of its class.
so, all depends on what line of code you are looking at.
kevingpo wrote:
While a & info are the references to the new constructed objects?
sorry, here, i don't understand your question...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I need to convert a rtf (or doc) file to a PDF file because the meetting only accepts PDF file.
could you tell me how to covert it?
I only have Adobe read (not write), may I use it for my purpose?
thx
includeh10
|
|
|
|
|
You need the full version of Acrobat, instead of just the reader. It costs money.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
FYI, Sourceforge has PDFCreator[^] and does a very good job converting to PDF for any program that has the ability to print.
Steve
|
|
|
|