|
can my application know if computer is connect to the internet very fast?
if yes, how?
I hope the detection is very fast, i.e. in 500 ms - slow detection is very easy.
thx
includeh10
|
|
|
|
|
|
Make A Worker thread that CHECK for internet every 100 ms, that the fastest way to detect any net connection
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Try:
IsDestinationReachable()
InetIsOffline()
InternetGetConnectedState()
InternetCheckConnection()
RasEnumConnections()
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi all
i want to send a BSTR data to a method of an interface of a com class . i recieved the BSTR from a method of another interface of the same com server ,but it generates a fatal error and terminates the program . is there any task to do before sending BSTR to the method , a conversion or something like that?
thank you .
|
|
|
|
|
What Type or Error are you getting and could you show your INTERFACE declaration.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Might be because of incorrect usage of BSTRs. Wherever possible, I'd suggest using CComBSTR or _bstr_t instead of raw BSTRs, as it is tough to keep track of them.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
thank you for your reply
HRESULT ISysR::GetP(BSTR * Blob1) .here the Blob1 is the output parameter .Inline HRESULT ICTParam::SetB(_bstr_t Blob2) and here the Blob2 is the input parameter . i want to send the Blob1 for the SetB method .but it shows the window "send error report " .
|
|
|
|
|
Where exactly does it bomb? I presume your code will be looking like this
HRESULT ISysR::GetP(BSTR *Blob1)
{
SetB(_bstr_t(*Blob1));
}
First, if Blob1 is an out parameter, it means that there would be no memory allocated (SysAllocString memory) to it, so calling any BSTR methods on Blob1 will blow up. The code calling GetP will probably be like
BSTR val;
GetP(&val);
It's GetP's job to allocate memory for the BSTR and return it back. What does you SetP method look like?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
thank you for your reply
IParam.tli file:
HRESULT ICParam::SetB ( _bstr_t Blob ) {
}
Iserv.tlh file :
HRESULT Iserv ::GetP(BSTR* Blob)
and in my code there is :
1 BSTR Blob=0;
2 hr = g_pIserv->GetP (&Blob);
3 if( FAILED( hr ) )
4 {
5 AfxMessageBox(" could not get param ");
6 }
7
8 hr = g_pIW51Param->SetB (Blob);
9 if( FAILED( hr ) )
10{
11 AfxMessageBox(" could not set blob ");
12}
at line 8 there is an error . it shows the error dialog with send error report button and don't send button .it doesn't say the error description
|
|
|
|
|
hai..
I am automating the word application. I need to retrieve the current line where the cursor is placed. And also if any bullets are present at starting of the line, i need the name of the bullet also.Please let me know.
Thanking you.
E.Veera Raghavendra.
e.veera raghavendra
|
|
|
|
|
hi
thanks for the previous help
i have got one more problem .
passing the tab ctrl b/w two files i am inserting the code for that .
but its working only in the debug mode not in the release mode .
i have checked inserting the message boxs . LeftWnd is the treeView window
And CTestPlanView is another Property Page
Event is OnKeyDown
if (nChar == 9)
{
MessageBox("tab pressed");
CSplitterFrame* pFrm = (CSplitterFrame*)GetParentFrame();
if (Item_Type=="D")
{
MessageBox("Item D is Highlighted");
if(app->m_bValue == false)
{
MessageBox("No items in the list");
CTransducerView *pListView=(CTransducerView *)pFrm->GetRightPane();
pListView->m_PropSheet.SetActivePage(0);
app->m_bTreeTabPressed = true;
pListView->SetFocus();
}
else
{
CTestPlanView *pListView = (CTestPlanView*)pFrm->GetRightPane();
pListView->SetFocus();
}
}
else
{
CView* pListView = NULL;
pListView=pFrm->GetRightPane();
app->m_bTreeTabPressed = true;
pListView->SetFocus();
}
|
|
|
|
|
Enclose your code with HTML pre and /pre tags, that will make it easier for us to read your code. Beyond that, after reformatting you code, it still makes no since.
You're getting pointers to frames and panes (both just pointers to windows), which you're not doing anything with.
Example:
{
CTransducerView *pListView=(CTransducerView *)pFrm->GetRightPane();
pListView->m_PropSheet.SetActivePage(0);
app->m_bTreeTabPressed = true;
pListView->SetFocus();
}
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
hi
GetRightPane is a function i have written to access many window handles depending on the situation. their are 2 panes right and left, both are splitted .i want to pass tab control from left pane to right pane .but its working in debug mode only not in the release mode .i tried it by doing it in PreTranslateMessage also but no use . i couldn't find the reason for this .using the frame i am getting the window handle of the propertypage i need and using pListView I am setting the focus for the page .
|
|
|
|
|
c:\program files\microsoft visual studio\vc98\include\mshtml.h(16768) : error C2367: 'IHTMLControlElement' : redefinition; different uuid specifiers
c:\program files\microsoft visual studio\vc98\include\mshtml.h(16768) : see declaration of 'IHTMLControlElement'
Hi,
Whenever I try to compile any project that uses CHtmlView I get the abover error. Any ideas how to fix this.. I took a quick look through the headers and couldn't find another definition of IHTMLControlElement? The error points to the line interface DECLSPEC_UUID("04598fc6-866c-11cf-ab7c-00aa00c08fcf") in mshtml.h
<br />
EXTERN_C const IID IID_IHTMLControlElement;<br />
<br />
#if defined(__cplusplus) && !defined(CINTERFACE)<br />
<br />
interface DECLSPEC_UUID("04598fc6-866c-11cf-ab7c-00aa00c08fcf")<br />
IHTMLControlElement : public IDispatch<br />
{<br />
public:
I am using VC6 SP6. This my first time working with CHtmlView and IWebBrowser2 classes and I can't even compile a sample
|
|
|
|
|
Can anyone please tell me how to create multiple windows that show up on the screen at the same time, and also if there is any libraries that support .gif within a window, if so, please point me in the right direction... thank you
|
|
|
|
|
I've not done multple seperate windows on the screen (under windows), but it should not be difficult (a window is a window). As for .gif support, well GDI+ probably supports that (SDK @ microsoft.com) and there are articles at CP that will direct you in the correct direction (namely CxImage).
Notes:
1) There are several aticles on GDI+ at CP.
2) Multple seperate windows: Child windows that are not resticted to diplaying inside the main application window.
3) You can probably create a non-child window by simply creating a window with the parent window set to NULL.
Any-way, just some thoughts off the top of my head.
I dought any of that helps but good luck, any-way.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Okay, but would i have to create an array of HINSTANCE object variables or an array of HWND object variables, by the way, the win32 API is being used to do this, as for the GDI+ thingamajig, where can i download the sdk?
|
|
|
|
|
how to make spin control range can be change by user???
for example:
a dialog box application with spin cotrol an static text for info the value of spin control. spin control range is 0 to 50. then user click a button to open a dialog box, then enter a value ... expl 60, then click OK, now spin control range is from 0 to 60.
for simple
m_abc.SetRange( x, y) <-- how to make x and y variable??
|
|
|
|
|
|
Anyone know how to send an attachment with WinHTTP?
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
Ed K wrote:
Anyone know how to send an attachment with WinHTTP?
Use POST method to send Attachment!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Ed K wrote:
Anyone know how to send an attachment with WinHTTP?
Have Look at this article, it POST file using WinHTTP
http://www.codeproject.com/internet/w3client.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
How can I create an instance of a remote COM object if I only know the Application ID of the object and the server it exists on. In other words, how would I go about doing something similar to the VB command:
<br />
Dim O As Object<br />
Set O = CreateObject("App.Object", "REMOTE_SERVER")<br />
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
I'm thinking this falls under DCOM or Remote Automation.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|