|
Hi,
I am getting error while compling my C++ code when I am using SafeArrayGetElement method in Unix.It is complining successfully in Windows.
Is there any equalent method for SafeArrayGetElement for getting each element from safearray in Unix enviroment?
Thanks in Advance
JK
|
|
|
|
|
AFAIK the aren't SafeArray s at all in UNIX .
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
|
|
|
|
|
Hi all..
I am creating a Log File..I want to use locking and unlocking function...I dnt have idea abt threading..plz give me some idea..
thanking you
sharan
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
What are you trying to "lock"? Are you trying to prevent simultaneous access to the file?
If so, between separate processes? Threads of the same process?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi..
I am trying to lock a log file...
I am creating a log file...which will be opened once...
i will write log errors to that....
i want to use locking so that no one else can write to that log file...
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
Open the file in a share mode that doesn't allow writing (e.g. pass 0 as share
mode parameter to CreateFile()).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
If you are trying to have a log file that can be read by other apps while you are still running, you can set the sharing permissions (allowing read access) correctly when opening/creating the file.
Note: I believe that some common Windows apps, like Notepad and Wordpad/Write, will try to open file with write/exclusive access, which is why some apps can open a file you are using while Notepad cannot.
I previously had to have a log file that was readily readable. Even though it sounds like a lot of overhead, I ended up opening/writing/closing the file each time I had to log something. Given that I only wrote log events between 1-4 times a second, the overhead (while measurable on the microsecond and clock tick level) was acceptable.
You likely would not want to do that if the log file is remote...
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
sharanu wrote: I dnt have idea abt threading..
Which has what to do with [un]locking a file?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have a trouble to get the local printer status. I simply want to check whether a printer is connected to my PC or not.
I used the GetPrinter() to retrieve the PRINTER_INFO_2. But the "Status" field always returns 0 whether the printer is connected or not, whether before or after sending the prints.
Can you help me with that? I am using VC++6.0 in WinXP.
Thanks a lot,
Stanley
|
|
|
|
|
Skywalker2008 wrote: But the "Status" field always returns 0
Odd, since none of the PRINTER_STATUS_xxx values resolves to 0 . Are you sure that GetPrinter() is returning a non-zero value?
You might also consider using the Win32_Printer WMI class.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes, the GetPrinter() returns a non-zero value and the "Status" field is 0 somehow although it is not among any of the defined PRINTER_STATUS_xxx values. Some related posts pointed to the lack of a bidirection communication feature of the printer. I am not sure and need check with the manufacturer.
The Win32_Printer WMI class sounds a great suggestion to me. I will try it since it contains a "PrinterStatus" property.
Thanks for the help!
Stanley
|
|
|
|
|
I must install which Windows Components before I install Visual Stduio 2003?
I insert the CD1 of VS2003, it always tell me to restart computer.
|
|
|
|
|
I don't remember the 2003 install needing any prerequisite installations that
it didn't install itself.
Maybe the .NET framework 1.1? Check the readme.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Read the senario first in order to understand the problem
I had compile service in order to logon to windows remotely. I am achieving this by opening a reference to winst0 desktop and getting the reference of the login windows and set the username and password.
There are 3 states in which the user name and password can be passed.
1. when the system is at logged out state i.e no user has logged on (my service is working in this state)
2. when the system is at locked out state by pressing ctrl+alt+delete and selecting lock option (my service is working in this state also)
3. when the target system is accessed via RDP, the target computer goes into locked state, this is where is am facing problem.
I cannot get the reference to the locked window.
Can any one please let me know what is the problem and how do i get the problem solved.
here is the code
HWINSTA hWinStaUser = OpenWindowStation("WinSta0", FALSE, MAXIMUM_ALLOWED);<br />
if(SetProcessWindowStation(hWinStaUser))<br />
{<br />
HDESK old_desktop = GetThreadDesktop(GetCurrentThreadId());<br />
if (SelectDesktop("Winlogon"))<br />
{<br />
HWND hwndCtrlAltDel = FindWindow("SAS window class", "SAS window");<br />
if (hwndCtrlAltDel == NULL) {<br />
myfile << "\"SAS window\" not found\n";<br />
hwndCtrlAltDel = HWND_BROADCAST;<br />
}else{<br />
SendMessage(hwndCtrlAltDel, WM_HOTKEY, 0, MAKELONG(MOD_ALT | MOD_CONTROL, VK_DELETE));<br />
}<br />
HWND w=NULL;<br />
<br />
if( NULL != (w=FindWindow(NULL,"Welcome to Windows")) || NULL != (w=FindWindow(NULL,"Computer Locked")) || hwndCtrlAltDel!=NULL )<br />
Sleep(1000);<br />
if(NULL != (w=FindWindow(NULL,"Log On to Windows")) || NULL != (w=FindWindow(NULL,"Unlock Computer")) ){<br />
keybd_event( VK_MENU, 0, 0, NULL );<br />
keybd_event( VkKeyScan('u'), 1, 0, NULL );<br />
keybd_event( VkKeyScan('u'), 1, KEYEVENTF_KEYUP, NULL );<br />
keybd_event( VK_MENU, 0, KEYEVENTF_KEYUP, NULL );<br />
Sleep( 50 );
<br />
char username[] = "Administrator";<br />
for( int c=0; c<strlen(username); c++="" )<br="" mode="hold" />{<br />
keybd_event( VkKeyScan(username[c]), 1, 0, NULL );<br />
keybd_event( VkKeyScan(username[c]), 1, KEYEVENTF_KEYUP, NULL );<br />
}<br />
keybd_event( VK_MENU, 0, 0, NULL );<br />
keybd_event( VkKeyScan('p'), 1, 0, NULL );<br />
keybd_event( VkKeyScan('p'), 1, KEYEVENTF_KEYUP, NULL );<br />
keybd_event( VK_MENU, 0, KEYEVENTF_KEYUP, NULL );<br />
Sleep( 50 );
<br />
char password[] = "admin";<br />
for( int c=0; c<strlen(password); c++="" )<br="" mode="hold" />{<br />
keybd_event( VkKeyScan(password[c]), 1, 0, NULL );<br />
keybd_event( VkKeyScan(password[c]), 1, KEYEVENTF_KEYUP, NULL );<br />
}<br />
<br />
HWND hwndDomain;<br />
int dwIndex;<br />
if(NULL!= (hwndDomain = GetDlgItem(w, 1504)) || NULL!= (hwndDomain = GetDlgItem(w, 1956))){<br />
dwIndex = (DWORD) SendMessage(hwndDomain, CB_FINDSTRINGEXACT, 0, (LPARAM) "DOMAIN1");<br />
}<br />
if (dwIndex != CB_ERR)<br />
{<br />
SendMessage(hwndDomain, CB_SETCURSEL, (WPARAM) dwIndex, 0);<br />
}<br />
keybd_event( VK_RETURN, 0, 0, NULL );<br />
keybd_event( VK_RETURN, KEYEVENTF_KEYUP, 0, NULL );<br />
}<br />
if (old_desktop != NULL)<br />
SelectHDESK(old_desktop);<br />
}<br />
if (hWinStaUser)<br />
CloseWindowStation(hWinStaUser);<br />
}
|
|
|
|
|
It could be that the visible desktop is not the secure (Winlogon ) desktop. Have you tried having your service enumerate the available desktops (and even looking for the dialog on a Desktop as it is enumerated)?
It might be that RDP handles (interactive) Desktops differently than the standard winstation because of how Terminal Services works.
Have you also tried getting the Winlogon desktop when no-one is logged in and an RDP session starts? (Just to complete your tests.)
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hi James
I had enumerated all the desktops here is the output but was unable to find the window of desktops
11:23:59.203 - Station: WinSta0
11:23:59.203 - Desktop: Default
11:23:59.203 - Window:
11:23:59.203 - Window:
11:23:59.203 - Window:
11:23:59.203 - Window:
11:23:59.203 - Window: Start Menu
11:23:59.203 - Window:
11:23:59.203 - Window:
11:23:59.203 - Window:
11:23:59.203 - Window:
11:23:59.203 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window: SysFader
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window: CB Monitor Window
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window: Local Disk (C
11:23:59.218 - Window:
11:23:59.218 - Window:
11:23:59.218 - Window: Services
11:23:59.218 - Window:
11:23:59.234 - Window: Command Prompt
11:23:59.234 - Window:
11:23:59.234 - Window: AXWIN Frame Window
11:23:59.234 - Window: Windows Task Manager
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window: MS_WebcheckMonitor
11:23:59.234 - Window: C:\Perl\bin\perl.exe
11:23:59.234 - Window: VMDnDControlTitle
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window:
11:23:59.234 - Window: KmlogonMessage
11:23:59.234 - Window: C:\WINDOWS\system32\java.exe
11:23:59.234 - Window: C:\WINDOWS\system32\java.exe
11:23:59.234 - Window: Connections Tray
11:23:59.234 - Window: Power Meter
11:23:59.234 - Window:
11:23:59.234 - Window: Program Manager
11:23:59.234 - Desktop: Disconnect
11:23:59.234 - EnumWindows failure(183)
11:23:59.234 - Desktop: Winlogon
11:23:59.234 - Window: MCI command handling window
11:23:59.234 - Window: Winlogon generic control dialog
11:23:59.234 - Window: MuDisconnect
11:23:59.234 - Window: MuStationLogo
11:23:59.234 - Window: KmlogonMessage
11:23:59.250 - Window: SAS window
11:23:59.250 -
11:23:59.265 - Station: Service-0x0-3e7$
11:23:59.265 - OpenWindowStation failure(5)
11:23:59.265 -
11:23:59.265 - Station: Service-0x0-3e4$
11:23:59.265 - OpenWindowStation failure(5)
11:23:59.281 -
11:23:59.281 - Station: Service-0x0-3e5$
11:23:59.296 - OpenWindowStation failure(5)
11:23:59.296 -
11:23:59.296 - Station: SAWinSta
11:23:59.296 - Desktop: SADesktop
11:23:59.296 - OpenDesktop failure(2)
11:24:09.296 -
I am able to get the reference of Winsta0 while the pc is in the RDP state and perform operations on it. All this takes effect in the background only.
Abdul khaliq
|
|
|
|
|
Hello,
I've downloaded an SDK an am able to get the code to compile with VC6 no problem but
when I use Express Edition 2008/2005 I get all sorts of compiler/linker errors. The
problem is I only have access to VC6 in work and would like to have a copy for myself.
Is it still available? or is there a way to get the Express Editions to use the VC6
compiler? Searching for this hasn't turned up anything
Also: Why would something compile with older versions and not newer ones?
Thanks
|
|
|
|
|
Probably it is better to fix the source code. Could you post, please, some of the error messages?
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
|
|
|
|
|
Hi Thanks for the help.
The project is set to compile to .dll. This is done with VC++ 9.0 Express
Here's some errors:
1>LibraryExample.cpp<br />
1>f:\copy of dmm\win32\include\gatantypes.h(403) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(404) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(405) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(407) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(408) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(409) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(411) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(412) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(413) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(415) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(416) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::float32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(417) : error C2906: 'Gatan::ScaleData<gatan::float32,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(419) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(420) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(421) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(423) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(424) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(425) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(538) : error C2906: 'Gatan::StringProxy_STL_Base<char>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(539) : error C2906: 'Gatan::ConstStringProxy_STL_Base<char>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(540) : error C2906: 'Gatan::StringProxy_STL_Base<gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(541) : error C2906: 'Gatan::ConstStringProxy_STL_Base<gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : warning C4346: 'To::ret_token_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1> f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(687) : see reference to class template instantiation 'Gatan::PlugIn::DM_DynamicCast<from,to>' being compiled<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2143: syntax error : missing ';' before '('<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : warning C4346: 'From::token_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2061: syntax error : identifier 'token_type'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(683) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : warning C4346: 'Gatan::PlugIn::DMScriptClassT<classdesc>::ref_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : error C2143: syntax error : missing ';' before 'Gatan::PlugIn::DMScriptClassT<classdesc>::ReplaceImplementation'<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : error C2888: 'DMScriptClassT<classdesc>::ref_type ref_type' : symbol cannot be defined within namespace 'PlugIn'<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : fatal error C1903: unable to recover from previous error(s); stopping compilation</classdesc></classdesc></classdesc></from,to></gatan::uint16></gatan::uint16></char></char></gatan::float64,gatan::uint32></gatan::float64,gatan::uint16></gatan::float64,gatan::uint8></gatan::uint32,gatan::float64></gatan::uint16,gatan::float64></gatan::uint8,gatan::float64></gatan::float32,gatan::float64></gatan::float64,gatan::float32></gatan::float64,gatan::float64></gatan::uint32,gatan::uint32></gatan::uint32,gatan::uint16></gatan::uint32,gatan::uint8></gatan::uint16,gatan::uint32></gatan::uint16,gatan::uint16></gatan::uint16,gatan::uint8></gatan::uint8,gatan::uint32></gatan::uint8,gatan::uint16></gatan::uint8,gatan::uint8>
All the errors about using 'template<>' i can solve by editing the header as advised in the error message.
I don't really know how to follow this error:
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2143: syntax error : missing ';' before '('<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : warning C4346: 'From::token_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2061: syntax error : identifier 'token_type'
which realte to this part of the header:
To::ret_token_type operator()( _GATAN_COMPILER_TYPENAME From::token_type tok )<br />
{ return reinterpret_cast<to::ret_token_type>( dm_env->convert_object( reinterpret_cast<dm_objecttoken>(tok), from_desc, to_desc ) ); }</dm_objecttoken></to::ret_token_type>
I did put 'token_type' and 'typename' in somewhere yesterday and solved them but i don't remember how.
Anyway once I got past these errors I ran in to linker errors.
Thanks
|
|
|
|
|
Did you try to prefix token_type with the typename keyword, as suggested?
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
|
|
|
|
|
Hi CPallini,
Yes I have sorted all the previous errors with the suggestions. I wanted to show them in case there was
something i could do with the compile options to get rid of these errors. (I thought I could ask the compiler
to be less strict. Since i got the same thing to compile first time with VC6).
Here's where i'm at now.
Linker errors: (the project was set up so that the linker has the path of the library)
Do you know what the weird combination of symbols mean? such as: (??0bad_cast@std@@QAE@PBD@Z)
1>Linking...<br />
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) already defined in DMPlugInBasic-Dbg.lib(ImageUtility.obj)<br />
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z) already defined in DMPlugInBasic-Dbg.lib(ImageUtility.obj)<br />
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ) already defined in DMPlugInBasic-Dbg.lib(ImageUtility.obj)<br />
1> Creating library .\Debug/LibraryExample.lib and object .\Debug/LibraryExample.exp<br />
1>LibraryExample.obj : error LNK2019: unresolved external symbol "void __cdecl Gatan::PlugIn::DMScript_HandleException(struct Gatan::PlugIn::DM_Env *,class std::exception const &)" (?DMScript_HandleException@PlugIn@Gatan@@YAXPAUDM_Env@12@ABVexception@std@@@Z) referenced in function __catch$?PlugIn_Start@@YAXXZ$0<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "private: static class std::locale::_Locimp * std::locale::_Locimp::_Global" (?_Global@_Locimp@locale@std@@0PAV123@A)<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2019: unresolved external symbol "protected: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@IAEXXZ) referenced in function "protected: void __thiscall std::basic_ios<char,struct std::char_traits<char=""> >::init(class std::basic_streambuf<char,struct std::char_traits<char=""> > *,bool)" (?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "__int64 const std::_Fpz" (?_Fpz@std@@3_JB)<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2019: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ) referenced in function "private: bool __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@std@@QBE_NXZ) referenced in function "class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const & __cdecl std::use_facet(class std::locale const &,class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const *,bool)" (?use_facet@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@1@ABVlocale@1@PBV21@_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2019: unresolved external symbol "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z) referenced in function "class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const & __cdecl std::use_facet(class std::locale const &,class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const *,bool)" (?use_facet@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@1@ABVlocale@1@PBV21@_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2019: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@std@@YAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::assign(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z)<br />
1>.\Debug/LibraryExample.dll : fatal error LNK1120: 8 unresolved externals</char></char,struct></char></char,struct></char></char,struct></char,class></char,class></char,class></char,class></char></char,struct></char,struct></char,struct>
|
|
|
|
|
Ylno wrote: Do you know what the weird combination of symbols mean? such as: (??0bad_cast@std@@QAE@PBD@Z)
It is C++ name decoration (or mangling) see, for instance [^].
Regarding the linker errors, perhaps this page [^] may help.
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
|
|
|
|
|
Thanks very much for the help. I'll take a look at those links.
Thanks
|
|
|
|
|
Ylno wrote: I've downloaded an SDK...
The Platform SDK or some other one?
Ylno wrote: Is it still available?
Is what still available?
Ylno wrote: or is there a way to get the Express Editions to use the VC6
compiler?
This makes no sense. Why would you want a new compiler/IDE to use an old compiler?
Ylno wrote: Also: Why would something compile with older versions and not newer ones?
Because the new compilers are more strict in adhereing to the C++ standards.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: The Platform SDK or some other one?
It's another SDK for compiling scripts into .dll to improve execution time.
DavidCrow wrote: Is what still available?
is the VC6 compiler/IDE available.
DavidCrow wrote: This makes no sense. Why would you want a new compiler/IDE to use an old compiler?
Because I got the code to compile with no problems in VC6 and the resulting .dll worked fine. And it seems too much hassle to
get the code to work with a more recent compiler.
|
|
|
|
|