| Simple question about dllimport |
|
 |
Index ‹ Visual Studio ‹ Visual Studio C++
|
- Previous
- 1
- 2
- Visual Studio C++ >> Problem with covariant return typesThe following code won't compile (error C2555: 'B::f': overriding virtual
function return type differs and is not covariant from 'A::f') unless I
moved the definitions of X and Y to before the definitions of A and B
respectively. Now I can understand that the compiler doesn't know that Y is
derived from X when parsing B but at the very least this is a very confusing
error message and I'm not sure it shouldn't be accepted.
Rob.
class X;
class A
{
public:
virtual X* f () const = 0;
};
class X
{
public:
};
class Y;
class B : public A
{
public:
virtual Y* f () const;
};
class Y : public X
{
public:
};
- 3
- MFC >> ActiveX in MFCI'm trying to create an ActiveX control in MFC.
I have a library which was provided for the development of an MFC program
NOT ActiveX.
I made a sample ActiveX and included the library under
Project->Settings->Link Tab but after building the ActiveX and viewing the
control in Test Container, no methods were exposed??
Am I doing something wrong or will the library NOT work with an ActiveX???
Thanks
David
- 4
- Visual Basic >> Calling a Macro from another workbookHi,
Yes I have read up on the different ways of doing this, but I always
come to the same problem.
In my current code I have the line
Application.Run ("T1Seed1.xls!Main")
Which works fine (it calls the "Main" macro in T1Seed2.xls). But once
the "main" macro is run, the rest of my current macro doesn't run.
Here is my code (missing some variables thata bit above, but thats
ok).
Dim ESDUFile, RootPath, WorkBookToOpen, SheetToOpen, BuildingHeight As
String
ESDUFile = Sheets("Rotate spf red").Cells(10, 9)
RootPath = ESDUFile
Do While Right(RootPath, 1) <> "\"
RootPath = Left(RootPath, Len(RootPath) - 1)
Loop
BuildingHeight = 225
SeedScale = 345
For A = 1 To NumTowers
For B = 1 To 2
SheetToOpen = "T" & A & "Seed" & B & ".xls"
WorkBookToOpen = RootPath & SheetToOpen
FileCopy ESDUFile, WorkBookToOpen
Range("C22:C57").Copy
Workbooks.Open WorkBookToOpen
Windows(SheetToOpen).Activate
Sheets("RWDI_Factors").Select
Range("H67").Select
ActiveSheet.Paste
Range("D7") = SeedScale
Range("D6") = BuildingHeight
Application.Run ("T1Seed1.xls!Main")
Sheets("Factors").Select
Application.CutCopyMode = False 'closes the clipboard with massive
amounts of data thus does not prompt to save or close
ActiveWorkbook.Close True ' false means not to save, true means to
save and close
Windows("MR_Setup_underDevelopment_profiles.xls").Activate
Next B
Next A
It works fine up until right after the Application.Run line where it
will not continue on (ie it will not select the "Factors" sheet or do
anything after).
Is there another way I can do this that will allow the original macro
to continue running after it calls the macro in the other workbook?
Any help would be appreciated.
Jack
- 5
- MFC >> When user trying to quit program while thread is runningHi guys, I have a memory leak problem. When I tried to quit program by click
'x' at top right corner while my ui thread and its child worker thread are
running, debugger display following messages:
The thread 0x570 has exited with code 0 (0x0).
The thread 0x574 has exited with code 0 (0x0).
Detected memory leaks!
Dumping objects ->
c:\work\MyProject\MyUIthread.cpp(396) : {717} normal block at 0x00C17CA8, 4
bytes long.
a CWinThread object at $00C17BF0, 112 bytes long
c:\work\MyProject\MyUIthread.cpp(96) : {550} normal block at 0x00C17FC0, 12
bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD
c:\work\MyProject\MyUIthread.cpp(94) : {549} normal block at 0x00C17398, 12
bytes long.
Data: < 0 > C2 30 00 00 F2 C9 00 02 D1 01 00 00
c:\work\MyProject\mainfrm.cpp(746) : {535} client block at 0x00C17E40,
subtype 0, 128 bytes long.
a CMyUIThread object at $00C17E40, 128 bytes long
Object dump complete.
The thread 0x304 has exited with code 0 (0x0).
The program c:\work\MyProject\Debug\MyProject.exe' has exited with code 0
(0x0).
In my program, ui thread is created when certain selection made from combo
box and shutdown, deleted when combo box selection. Ui thread creates one
worker thread for communication with embeded system via COM port. So in a
normal situation(combo box changed), shutdown prccedure is like this: First,
main frame PostThreadMessage(QUIT) to ui thread. Ui thread set 'running'
flag to FALSE to let worker thread exit its while(running) loop. Just before
exit, worker thread sends another QUIT packet to embeded system to power off
then PostMessage(THREAD_QUIT) to main frame. Message handler in main frame
wait for m_hThread and delete pThread. Debugger doesn't complain about this
normal shutdown and the program looks just fine when I try without debugger.
Can I neglect this situation?
Where can I insert this shutdown procedure when program is forced to quit
while threads running?
Any suggestion appreciated. Cheers
- 6
- Visual Studio C++ >> How to convert _TCHAR * to string?I need to check command line parameter
if (argv[1] == option) .... // option is a string variable
And argv is defined as _TCHAR* argv[] by MSVS wizard.
The code don't work and it's very hard to convert argv[1] to string.
- 7
- Visual Basic [VB] >> TUTORIALS ON COMPUTER PROGRAMMINGlanguages Have the complete details regarding programming languages.
A-Z about programming languages like Java J2EE, C++, code
implementation guides and more.
http://operatingsys.blogspot.com/
Google.com is not only a search engine but also does webadvertising
through websites and blogs.
Lakhs of common people are earning hundreds of dollars through online
advertising.
It also has other products like chatting,google earth,google talk etc.
Genuine Internet jobs for all. Earn Unlimited income.visit
http://googlepromisesyou.blogspot.com/
- 8
- MFC >> VC2008 dpiaware manifest?When you create a new MFC application with the wizard in VC2008 you will see
the following code in stdafx.h:
#pragma comment(linker,"/manifestdependency:\"type='win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
What do you write in stdafx.h to add the dpiaware manifest (se below) the
same way?
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
Best regards from Gaute
- 9
- Visual Basic >> Icon size problemHello,
My program's frmAbout has an icon. The ico file has the same icon in two
sizes, 16 x 16 and 32 x 32 pixels. I don't want the smaller one to be
displayed to users. So, the size should be 32 x 32 pixels.
Anyway, on some computers the icon will be displayed in size 16 x 16
pixels. How could I prevent this?
The ico file is dislayed in picIcon which is a PictureBox element. Its
ScaleMode is "Pixel", AutoDraw is "False", and AutoSize is "False".
The ScaleMode value of frmAbout is "Twip".
What should I do?
Thanks,
Mika
- 10
- Visual Basic >> "Reading emails from All Public folders"Hi,
I am developing a vb application to read the latest arrived mail from
"All public folders" through outlook. This should be dynamic as the
folders increase in the "All Public folders", The program should read
the folders accordingly.
Can anyone help on this.
- 11
- Visual Basic >> compiling the entire thingHi guys...
Here's a quick query...
I have almost finished making my first project in vb...
But I am confused...as to how should i compile the entire project and make a
setup ...
i know how to make the exe files...
I searched through MSDN but couldn't get much info...
And does the setup do everything ?...I mean what about the DSNs I created in
Control Panel, and what about my entire database ?...is that also properly
installed with the setup ?...
And how do i start doing it ?....
Please help...
thanks..
anupam
anupam@anupamjain.com
- 12
- VB Scripts >> force clicking on an objectHello,
How can I force clicking on an object,
if I have the following code, and I want to do click on event_view -
How can I do that ?
Thanks :)
The code :
-------------
<input type="hidden" id="event_view" onclick = "myview" />
...
- 13
- Visual Studio C++ >> bit shiftingi wanna shift the unsigned int e.g.
from
BINARY: 0110 0000 0011 0000 1101 0000 0000 0001
into
BINARY: 1000 0000 0000 0100 0000 0000 0000 0000
with the code i << 18;
but it seems that it won't detected the leading zero during shifting ?
and wrongly give me
0100 0000 0000 0100 0000 0000 0000 0000
any solution for that ?~
- 14
- Visual Basic >> ErrorsDear All,
Does anyone know of a third party tool that can add error handling code to
all subs/functions in a class or module to a specified format which then can
be customised to deal with the errors likely to be raised at the code?
I have been neglectful in adding error handling code and comments as I go as
the project has now grown and other developers are going to be using my
code. I know that it is bad practice and I have learned my lesson, but any
advice, other than its your own fault, would be most welcome. If I have to
create my own add-in for the future, can anyone suggest how I can
programatically find the start and end of a sub to add the suggested code?
Thanks again.
Alastair MacFarlane
- 15
|
| Author |
Message |
agraymngmailcom

|
Posted: Fri Apr 28 09:09:28 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
I've got a h file for a usb device that has definitions of function exported
from a dll. An example would be (with #defines translated):
extern "C" __declspec(dllimport) int __stdcall FT_Open(int deviceNumber, int
*pHandle);
but where is the actual dll filename specified so my program knows where to
find it?
Thanks,
Michael
Visual Studio227
|
| |
|
| |
 |
Victor

|
Posted: Fri Apr 28 09:09:28 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
Michael C wrote:
> I've got a h file for a usb device that has definitions
declarations
> of function
> exported
imported (apparently)
> from a dll. An example would be (with #defines translated):
>
> extern "C" __declspec(dllimport) int __stdcall FT_Open(int
> deviceNumber, int *pHandle);
>
> but where is the actual dll filename specified so my program knows
> where to find it?
That should be resolved during linking. Your project needs to have
the "export library" of that DLL supplied in the linker inputs.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
|
| |
|
| |
 |
Bruno

|
Posted: Fri Apr 28 09:13:49 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
> I've got a h file for a usb device that has definitions of function
> exported
> from a dll. An example would be (with #defines translated):
>
> extern "C" __declspec(dllimport) int __stdcall FT_Open(int deviceNumber,
> int
> *pHandle);
>
> but where is the actual dll filename specified so my program knows where
> to
> find it?
it does not have to be specified at all.
the normal course of action is to add the dll's corresponding .lib file to
your linker input.
if your code references the function, the linker will search the import
directive in the lib file and add it
to your executable. that way your exe will load the dll ar runtime.
your exe will search the dll alongside your exe, in the current folder, in
the windows folders or in the folders that are specified in the path
variable.
--
Kind regards,
Bruno van Dooren
EMail@HideDomain.com
Remove only "_nos_pam"
|
| |
|
| |
 |
Michael

|
Posted: Fri Apr 28 09:42:54 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
"Bruno van Dooren" <EMail@HideDomain.com> wrote in message
> it does not have to be specified at all.
>
> the normal course of action is to add the dll's corresponding .lib file to
> your linker input.
> if your code references the function, the linker will search the import
> directive in the lib file and add it
> to your executable. that way your exe will load the dll ar runtime.
>
> your exe will search the dll alongside your exe, in the current folder, in
> the windows folders or in the folders that are specified in the path
> variable.
Thanks for the reply bruno. What happens if I don't have a lib file? All I
got was a h file in a pdf doc.
Cheers,
Michael
|
| |
|
| |
 |
Michael

|
Posted: Fri Apr 28 09:43:45 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
"Victor Bazarov" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Michael C wrote:
>> I've got a h file for a usb device that has definitions
>
> declarations
>
>> of function
>> exported
>
> imported (apparently)
Exported from the dll, imported by my code I presume?
Michael
|
| |
|
| |
 |
Victor

|
Posted: Fri Apr 28 10:19:20 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
Michael C wrote:
> "Victor Bazarov" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.com...
>> Michael C wrote:
>>> I've got a h file for a usb device that has definitions
>>
>> declarations
>>
>>> of function
>>> exported
>>
>> imported (apparently)
>
> Exported from the dll, imported by my code I presume?
Right, but you were showing us _your_ code, weren't you? :-)
|
| |
|
| |
 |
Igor

|
Posted: Fri Apr 28 10:22:31 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
Michael C <EMail@HideDomain.com> wrote:
> Thanks for the reply bruno. What happens if I don't have a lib file?
> All I got was a h file in a pdf doc.
Presumably, you also have the DLL itself. See KB Article KB131313 "How
To Create 32-bit Import Libraries Without .OBJs or Source".
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
|
| |
|
| |
 |
Michael

|
Posted: Fri Apr 28 18:41:58 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
"Victor Bazarov" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Right, but you were showing us _your_ code, weren't you? :-)
Read my post again, I what I wrote was technically correct. When I said "a
dll" I meant the dll for the usb device. Not that it's that important :-)
"I've got a h file for a usb device that has definitions of function
exported
from a dll."
Michael
|
| |
|
| |
 |
Michael

|
Posted: Fri Apr 28 19:33:21 CDT 2006 |
Top |
Visual Studio C++ >> Simple question about dllimport
"Igor Tandetnik" <EMail@HideDomain.com> wrote in message
news:%EMail@HideDomain.com...
> Michael C <EMail@HideDomain.com> wrote:
>> Thanks for the reply bruno. What happens if I don't have a lib file?
>> All I got was a h file in a pdf doc.
>
> Presumably, you also have the DLL itself. See KB Article KB131313 "How To
> Create 32-bit Import Libraries Without .OBJs or Source".
Thanks Igor, after reading the article it sounded like a lot of work so I
managed to hunt down the lib file. It was packaged with the drivers instead
of the developer info for some reason. Everything is working good now.
Michael
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ Visual Studio C++ |
- Next
- 1
- Visual Studio C++ >> LNK 4210 comes when i migrate from VC6.0 to VC8.0Hi,
I had a DLL build using VC 6.0. I migrated the Source to VC8.0. Now I
am getting the linker error "LNK4210: .CRT section exists; there may be
unhandled static initializers or terminators".
Please note that I have my own DLL Entry point specified in the make
file for the DLL.
I have checked documentation. I have tried to call _CRT_INIT function
in my entry point funtion but then i get the LNK2001 unresolved
external symbol CRT_INIT.
Can anybody tell me the exact problem and fix for it.
As far as I can figure out the constructors for global members is
called by run time library. but in this case i am not able to
initialize the run time library (_CRT_INIT ??)
Thanks
Programmer_2004
- 2
- MFC >> Internal error.. any help?Can anybody please help me in fixing this link error that i get in my
VC++ project?
Linking...
LINK : error : Internal error during ReadSymbolTable
ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0040ED6B
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000001
ExceptionInformation[ 1] = 00000000
CONTEXT:
Eax = 40070F98 Esp = 0012EAC4
Ebx = 3FFF0000 Ebp = 004695A8
Ecx = C0000A40 Esi = 40070F5C
Edx = 00000000 Edi = 3FFF01C0
Eip = 0040ED6B EFlags = 00010202
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012EAC4 Dr3 = 3FFF0000
Dr1 = 004695A8 Dr6 = C0000A40
Dr2 = 00000000 Dr7 = 00000000
Error executing link.exe.
Tool execution canceled by user.
I get this error when i try to build a VC++ project that uses a static
library was made using another VC++ project.
Thanks
- 3
- MFC >> VC++6, DAO, Access, create tableI'm trying to create a table using the Execute method of
CDaoDatabase. However, when trying these statements I get
the corresponding errors shown below
TRIED:
CREATE TABLE Kund (Kundnr NUMBER PRIMARY KEY NOT NULL,
Namn TEXT(40) NOT NULL, Ort TEXT(30))
ERROR MESSAGE:
Syntax error in CREATE TABLE statement.
TRIED:
CREATE TABLE Kund (Kundnr NUMBER PRIMARY KEY NOT NULL,
Namn TEXT NOT NULL, Ort TEXT)
ERROR MESSAGE:
Syntax error in CREATE TABLE statement.
That error message is not very helpful. Is there a way to
see more exactly what the error is? Or if you don't know
that, maybe you know what is wrong with my Access SQL
query?
/Joachim
- 4
- VB Scripts >> Help with Right functionnnanna wrote:
> *SAMPLE FILE IS:*
>
> 13301794560@133SH.COM
> 13301794560@133SH.COM
> 2205171@MCIMAIL.COM
> 35988869625@SMS.MTEL.NET
>
> *DESIRED RESULT:
>
> 133sh.com
> MCIMAIL.COM
> sms.mtel.net
>
> When I use the [B]Right* function to get the strings right of "@" it
> doesn't give me the desired result, the *Left* function does
> give strings right of "@". Any ideas?
>
> CODE
>
> '##############################################################################################
> '##############################################
>
> 'Textfile to read
> sInpFile = "C:\WindowsScripts\vbscript\ExcelList\ListItems.txt"
>
> 'Result file
> sResultFile = "C:\WindowsScripts\vbscript\ExcelList\clean.txt"
>
> 'Character to search
> strInput = "@"
>
> ' FileSystemObject.CreateTextFile
> Const OverwriteIfExist = -1
> Const FailIfExist = 0
>
> ' FileSystemObject.OpenTextFile
>
> Const FailIfNotExist = 0
> Const ForReading = 1
> Const ForAppending = 8
>
>
>
> Set oFSO = CreateObject("Scripting.FileSystemObject")
>
> ' Get list item names into an array:
> Set f = oFSO.OpenTextFile (sInpFile,ForReading, FailIfNotExist,
> OpenAsASCII)
>
>
>
>
> Dim aListitem()
> i = 0
> Do Until f.AtEndOfStream
> sLine = Trim(f.ReadLine)
> If Not sLine = "" Then
> ReDim Preserve aListitem(i)
> aListitem(i) = sLine
> i = i + 1
> End If
> Loop
> f.Close
>
> ' Loop through the listitem array
>
>
> ' Create result file
> Set fOutputFile = oFSO.CreateTextFile(sResultFile,OverwriteIfExist,
> OpenAsASCII)
>
>
>
> For Each sItem In aListitem
>
> kline = instr(sItem,strInput)
> pline = left(sItem,kline)
> fOutputFile.WriteLine pline
> kline = 0
>
> Next
> 'fOutputFile.close
>
> wscript.echo "Process Complete" [/B]
Never mind guys....I figured it out
--
nnanna
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
- 5
- MFC >> Looking for information on MFC TCP CommunicationWe have roughly 6 software programs that run in tandum with each other
that currnetly use UDP to transmit information (Images, various little
packets, etc) between each program. I'm developing a new application
that is pumping more data through and we've decided to give TCP a shot.
I'm personally new to Network communication and TCP, I know the basics,
but nothing in-depth. I'm looking to develop a generic stand-alone
class with input and output queues that will act as an interface for
each program. I think this will be the best way to go, but welcome any
other suggestions from those with more experience.
Can someone point me to a location where I can get an intro to socket
communication with MFC?
The sending / receiving will be done in seperate threads as queue data
arrives. I've read that CAsyncSocket has issues with threading. Does
anyone know if this is still the case?
Thanks in advance for the help,
Josh McFarlane
- 6
- 7
- VB Scripts >> Collections in ASP and XML, using the Session Object (Part 1)Let's say that I have an xml file with:
<PRODUCTS>
<PRODUCT>
<SKU>AAA111</SKU>
<NAME>Name One</NAME>
<COLORS>
<COLOR><ID>BK</ID><PRICE>10</PRICE></COLOR>
<COLOR><ID>WH</ID><PRICE>20</PRICE></COLOR>
</COLORS>
</PRODUCT>
<PRODUCT>
<SKU>BBB222</SKU>
<NAME>Name Two</NAME>
<COLORS>
<COLOR><ID>BK</ID><PRICE>20</PRICE></COLOR>
<COLOR><ID>WH</ID><PRICE>30</PRICE></COLOR>
</COLORS>
</PRODUCT>
<PRODUCTS>
When the session starts, I want to create a Session Variable/Object
that can be used in ASPs later like this:
(Example Use in VBScript)
Dim colProducts
colProducts = Session("PRODUCTS")
For Each oProduct In colProducts
Response.Write(oMyProduct("SKU")
For Each oColor In oProduct("COLORS") ' Access a SUB collection
directly.
Response.Write(oColor("ID"))
Next
Next
oMyProduct = colProducts("AAA111")
Response.Write(oMyProduct("NAME"))
It has been a very long time since I coded, and so my code is probably
a bit rusty. Also, I have never really worked with collections.
My questions are:
1.) In my session_onstart code, how do I create a collection and store
it into the session variable? What language should I use? Code
Examples?
2.) In my ASPs, how do I propperly access those collections and
sub-collections? Languages? Code Examples?
Thanks in advance.
- 8
- MFC >> How to implement transparent static on dialog box?I would implement a transparent static text to show
the status text of the progress on dialog box.
The background of dialog box is not default system color.
Originally, I set the bk mode of the static to transparent mode
and return a NULL_BRUSH in OnCtlColor() of dialog class.
It can fit my requirement if the static text is not changed.
However, the old text is not erased if the static text is changed.
I think I need to override some function to erase background first.
Which function do I need to override to erase the background?
or I need to implement my own static class to do so? and how?
Best Regards
Jackal Huang
- 9
- VB Scripts >> Check for enabled NIC and execute commandHello all. I am trying to write a script with minimal vbs knowledge. I have
downloaded scriptomatic 2.0 and have made some progress but have come to a
head.
Background:
We use WSUS for all local and remote users in an NT4 domain (soon to be
migrated to AD). Remote users connect via Cisco VPN client. The clients
installs as a network device, is disable when not in use and enables when
the GUI is loaded. The detection frequency setting for WSUS runs at
intervals of 8 - 20 hours according to the documentation. This causes the
remote client to almost never check for updates.
Solution:
Write a script which checks or better still listens if the VPN is active
(objItem.ServiceName(CVirtA) and when it becomes active
(objItem.NetConnectionStatus=2) then run the command (wuauclt /detectnow).
I have the beginnings of something pasted in below which obviously doesnt
quite work unless you comment a few lines here and there, but doing that
does not give the desired result.
Can I use wsh/vbs to monitor the connection or would this need to work on a
timer?
If a timer how would that affect memory consumption on the notebook?
TIA.
' start script
On Error Resume
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
arrComputers = Array("localhost")
For Each strComputer in arrComputers
WScript.Echo
WScript.Echo "======================"
WScript.Echo "Computer: "& strComputer
WScript.Echo "======================"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapter", "WQL", _
wbemFlagReturnImmediately
+ wbemFlagForwardOnly)
If objItem.ServiceName="CVirtA" And objItem.NetConnectionStatus="2" Then
' C:\Windows\SYSTEM32\wuauclt.exe /detectnow
End If
- 10
- MFC >> RoundRect and borderHello,
I'm using RoundRect method to draw a rectangle.
How do I draw a RoundBorder(using different color) around this
RoundRectangle ?
Thanks,
Janiv Ratson.
- 11
- MFC >> DeleteTimerQueueEx, why it never returns?Hi,
I've got a thread, where i create TimerQueue. Everything goes perfect,
untill i don't want to close the Queue. If i do it that way:
DeleteTimerQueueEx( m_hTimerOutQueue, INVALID_HANDLE_VALUE );
it never returns. But if i Close it like that:
DeleteTimerQueueEx( m_hTimerOutQueue, NULL);
it obviously returns, but i can't start it again. Could You, please tell me,
what can couse that?
I'm just the beginner with MultiThreading and Timers, so i don't even know,
what could help You in finding out the solution.
Ask me whatever You want:]
Thx GIGI
- 12
- Visual Basic [VB] >> Console.Writeline hangs if user click into the console windowI have a console app which does it's job and frequently spits out status
messages with Console.Writeline. I noticed that, if the user
accidentally clicks into the black console window, the cursor changes to
a filled white rectangle, and the app hangs at the next Console.Write
statement.
Can that be solved somehow? It is very dangerous for the application to
stop just because of a wrong mouse click.
I know I could reimplement the app as a windows forms app and write the
status messages to a ListView - but it is more of a fundamental
question. Since if this cannot be solved, I'd never write another
console app again for production environments.
Thanks for any help
Urs
- 13
- VB Scripts >> Bold characters in a message boxHi there
This is a newbie question.
How can i put some characters in bold in a message box? I tried with \b
but couldn't succeed.
And how to insert a CRLF in a message box?
Thanks for your help
Phil
- 14
- MFC >> CRichEdit Control -Vertical Allignment(Visio Type)Hai,
Iam looking to insert text in RichEdit Control so that it is
centered/left/right vertically and by default VC++,CRichEdit supports
Horizantal allilgnment and i would like to do similar to Visio if we drag a
box and enter the text and we have both options(Horizantal/Vertical) to set
the text in the box and any expert comments would be helpful
Thanks and Regards
suresh
- 15
- Visual Basic >> output to text file copied data from Clipboard...Hi, I'm a bit new to this... but here it goes.
I have created a macro on which in one part it does a copy of a
certain selected text. I wan't this copied strings, which I belive is
now on the clipboard, pasted on a text file.... or essantially I wan't
to know how can I output this copied data to a text file? any ideas...
thanks in advance!
-Jona
|
|
|