|
mike.r.winter@btinternet.com wrote: I wish to do the same in VC (6.0) - have you any suggestions?
Take a look at the FindFirstFile/FindNextFile[^] functions; they may be what you need.
|
|
|
|
|
Excellent - thanks very much - using the example got exactly what I wanted!
Thanks very much
Mike
|
|
|
|
|
After importing the idl file "msado15.idl" in the idl file of my DLL and the build i have many errors like this:
1>c:\sac\see_ac_services\debug\msado15.tli(2103) : error C2065: '_result' : undeclared identifier
1>c:\sac\see_ac_services\debug\msado15.tli(2105) : error C2065: '_result' : undeclared identifier
1>c:\sac\see_ac_services\debug\msadox.tlh(495) : error C2327: 'ADOX::_Index::Properties' : is not a type name, static, or enumerator
1>c:\sac\see_ac_services\debug\msadox.tlh(1059) : error C2327: 'ADOX::_Table::Properties' : is not a type name, static, or enumerator
1>c:\sac\see_ac_services\debug\msadox.tlh(1172) : error C2327: 'ADOX::_Column::Properties' : is not a type name, static, or enumerator
1>c:\sac\see_ac_services\debug\msadox.tlh(1265) : error C2327: 'ADOX::_Group::Properties' : is not a type name, static, or enumerator
1>c:\sac\see_ac_services\debug\msadox.tlh(1364) : error C2327: 'ADOX::_User::Properties' : is not a type name, static, or enumerator
1>c:\sac\see_ac_services\debug\msadox.tli(245) : error C2065: '_result' : undeclared identifier
1>c:\sac\see_ac_services\debug\msadox.tli(246) : error C2065: '_result' : undeclared identifier
1>c:\sac\see_ac_services\debug\msadox.tli(248) : error C2065: '_result' : undeclared identifier
knowing that I have imported the "msado15.dll" in my DLL (in the stdAfx.h file)
So someone know where is the problem and help me please ?
|
|
|
|
|
I added
#import <c:\Program Files\Common Files\system\ado\msado15.dll> rename("EOF", "adoEOF") and it compiled fine. What do you have before this statement?
"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
|
|
|
|
|
what i did is like below :
i imported the msado15.idl (import "msado15.idl) in the begining of my IDL file (before the def of my Library) to use the ADO connection type as parameter of method.
But it compile with errors like i posted.
|
|
|
|
|
Are there any other ado include files in stdafx? if try moving it to after import line.
-Suhredayan
|
|
|
|
|
- No, there is no include ADO in stdAfx.h
- The two line :
#import "C:\Program Files\Fichiers communs\System\ado\msado15.dll" rename_namespace("Internal") rename( "EOF", "EndOfFile" )
#import "C:\Program Files\Fichiers communs\System\ado\msadox.dll"
are imported in most files of my project.
- My problem is related with the IDL file of my DLL and it begin when i try to put ADO connection as parameter of method in the IDL -> So i need to add the line import "msado15.idl"; and here i get about 2000 errors like this :
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msado15.tlh(1024) : error C2327: 'Internal::_ADO::Properties' : is not a type name, static, or enumerator
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msado15.tlh(3124) : error C2327: 'Internal::_Record::Fields' : is not a type name, static, or enumerator
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msado15.tli(109) : error C2065: '_result' : undeclared identifier
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msado15.tli(1104) : error C2065: '_result' : undeclared identifier
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msadox.tlh(1265) : error C2327: 'ADOX::_Group::Properties' : is not a type name, static, or enumerator
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msadox.tlh(1364) : error C2327: 'ADOX::_User::Properties' : is not a type name, static, or enumerator
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msadox.tli(857) : error C2065: '_result' : undeclared identifier
C2065: '_result' : undeclared identifier
1>d:\travail\see_user_access\version 2.20\source\sac\see_ac_services\debug\msadox.tli(927) : error C2065: '_result' : undeclared identifier
So i hope i explained more my situation and you can find where is the problem?
|
|
|
|
|
Hi all!
I have a weird problem. I have an application written in c++ and compiled with visual studio.net and connecting to an Oracle with MS ODBC driver. Now the app is built under vs 9 and the ODBC driver is changed to the Oracle's one. (ODBC: Oracle in Orahome92). The connection string had to be changed to the Oracle's one syntax. Unfortunately the SQLDriverConnect crashes with access violation. In the Call stack the last source before asm is the delayhlp.cpp but nothing relevant info can be found. The interresting part is that I build a little sample application using the same Visual studio (9), same ODBC (oracle), same connection string ("Driver={Oracle ODBC Driver};DSN=db;Uid=admin;Pwd=admin;";) and there it works. No error with the function. Can anybody advice? Of course, if I missed some details, let me know.
-mfg-
adam
|
|
|
|
|
See if this[^] gives any lead.
|
|
|
|
|
Hi,
unfortunately I knew it and this is why I changed the MS ODBC driver to the ORACLE ODBC driver. The problem is more complex, since this is working in one project and does not in another.
-mfg-
adam
|
|
|
|
|
Hello,
Before I ask my question I think a little background is required.
First off, I'm not a computer programmer by trade; it's something I do for fun so please forgive me if I get a few terms incorrect.
A while ago I set out to learn how to use OpenGL. Using Visual C++ Express and Win32 API, I managed to create a little program where an image from file was loaded, and the user could walk around the image and when the user clicked the mouse button the image exploded into a million little pieces and fell down like snow. I tuned the parameters so that it looked just right.
Being pleased with my creation, I thought I'd show it to a few friends. On transferring the executable to a friends machine (which had a superior graphics card and Processor) I was stunned to see that the application was very slow.
Could somebody tell me why this may be the case? and how I can correct this?
Thanks in advance,
Anil
|
|
|
|
|
Maybe your friend has some other processes running in the background that use most of his CPU power. Then there's memory size, if he doesn't have too much free memory windows might start swapping while your program runns and that can and will slow things down (check if there's a lot of HDD activity while your program runs). Or it is a driver issue, for some reason OpenGL misses to detect/work with his 3D hardware so it reaches back to software emulation mode, this is not likely but who knows, do other OpenGL programs, games run fine and fast on his comp? Could also be that althorough his computer has a "superior graphic card" as you wrote, it does not have support for some feature you used in hardware so OpenGL uses software emulation which is much slower. Or it is a hardware issue, does he play 3D games, do those run fine on his comp? Can't think of anything else right now, mabye others will give you some more ideas...
> 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. <
|
|
|
|
|
Hi Thanks for your reply,
I shall try to answer your question. I hope they will prove to be usefull
Code-o-mat wrote: Maybe your friend has some other processes running in the background that use most of his CPU power
I tried the program after a reboot. Granted there may have been some applications running in the background, but I would imagine it would be minimul
Code-o-mat wrote: Then there's memory size, if he doesn't have too much free memory windows might start swapping while your program runns and that can and will slow things down (check if there's a lot of HDD activity while your program runs)
I do not know how much memory (RAM) his machine has, but I'm pretty sure it has more than my laptop.
Code-o-mat wrote: Or it is a driver issue, for some reason OpenGL misses to detect/work with his 3D hardware so it reaches back to software emulation mode, this is not likely but who knows, do other OpenGL programs, games run fine and fast on his comp?
I've not tired other OpenGL programs I've written. Games run well on his machine.
Code-o-mat wrote: Could also be that althorough his computer has a "superior graphic card" as you wrote, it does not have support for some feature you used in hardware so OpenGL uses software emulation which is much slower
I believe he has a Nvidia card (8800GT?). I have an "integrated card" apparently. I didn't use any extended features of openGL. Infact i stuck with the basic Microsoft implementation, which i believe is version 1.1.
Code-o-mat wrote: Or it is a hardware issue, does he play 3D games, do those run fine on his comp?
3D games work really well on his machine. I've seen him play Counter Strike (Is that an OpenGl Game?), Command and Conquer 3, and Lord of the Rings online. To date I've not seen the frame rate drop, and he has the luxury of always selecting the best graphics options.
Something else I have just thought of is that my processor is a single core, but his is has a quad core. Could that be an issue? also I compiled my code on vista, but he uses XP. Perhaps theres some compiler options in Visual C++ that I need to look at. Any help would be appreciated.
|
|
|
|
|
Hi,
I have opened a comms port and I am reading data being sent to me. The program runs OK for a day or two (or three!) then ReadFile() returns FALSE with GetLastError() returning 5 (Access Denied). If I exit the application and re-start it, it works again.
The data rate is trivial so it doesnt appear to be due to an overflow.
The comms port is on a USB/serial adapter and the program is compiled using MSDEV 2008. I am not using overlapped access.
Anyone have any ideas what could be causing this or what I could try?
Thanks
Tony
|
|
|
|
|
softwaremonkey wrote: Anyone have any ideas what...I could try?
Have you tried this?
"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
|
|
|
|
|
Just a stab in the dark, but maybe you should open the file (comm port) with SHARE_DENY_xxxx flags, to make sure another program does not come along ang grab the comm port out from under you.
When this happens, can you rerun your program straight away? Could you "just" detect this failure, close your file handle, wait a second or three, then reopen the comm port? Whether that it bad will depend heaviliy on how much the comm port is in action.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi,
Windwos Font baseline is not aligned. Different font has different baseline.
I think I am using "ANSI_CHARSET". (I used "GetTextMetrics" to find out that "tmCharSet = 0")
If I select "SimSun" Font, the char will shift a little bit below the baseline. It is weird.
I tried to use "WORD" to repeat this. I found out:
If I type some chars using other font and then change to "SimSun" Font. All preceding chars were shifted a little down after a char using "SimSun" Font was input.
How can I find out how much I need to shift and what kind of font I need to shift?
Thank you very much,
modified on Tuesday, October 27, 2009 1:38 PM
|
|
|
|
|
I answered this question a couple of days ago; I don't think anything has changed much in the intervening time.
|
|
|
|
|
Hi
I did not get solution from you. The reason I post again I want to see others know the solution of it or not. It looks like not many are very familiar with Windows Font. I might need to deal with it myself. It will take a lot of time.
Thanks,
|
|
|
|
|
transoft wrote: I did not get solution from you.
Maybe not the solution you wanted, but I did explain what you need to do, part of which includes some research into fonts.
|
|
|
|
|
Hi,
I have a few property pages where I have collected all of the classes and implementation in one file (used the class wizard to do this).
On one of my property pages I get a strange run time exception on MS code in routine DDX_CBString.
I also noticed that the dialog "add variable" tool does not see any of the variables for the various resources (list boxes, comboboxes etc.) so it seems to be lost. Before this I noticed it would hang when I tried to create a variable for a resource or it reported file was read only. Also, I cannot add variables to new resources on this property page (wizard completes but variable not added to code).
I can delete all of my variables in the file and try to re-create them with the wizard but I thought I'd ask to see if anyone has experienced this.
Using VS 2005.
Thanks
|
|
|
|
|
al2500 wrote: On one of my property pages I get a strange run time exception on MS code in routine DDX_CBString.
An exception or an assertion?
"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
|
|
|
|
|
I forget - bad pointer value.
I had to delete everything related to this property page and rebuild it - add variable wizard hangs even on startup.
|
|
|
|
|
I found a difference between a combobox data variable that works (in a different property page) and the one that gives an error.
The one that works uses -
DDX_Text
The one that has a run time error uses -
DDX_CBString
As far as I know all of the properties for the combobox are the same.
I looked these up in help and I can't tell why one would be used over the other but simply changing DDX_CBString to DDX_Text still results in a run time error.
modified on Tuesday, October 27, 2009 12:29 PM
|
|
|
|
|
It looks as though you are using a CString variable for your combobox instead of a CComboBox variable.
"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
|
|
|
|