|
Adeel Mirza wrote: I am taking it from google or yahoo
I think perhaps you need to understand how web pages work. What you are trying to do is capture information from a web page when a certain action happens on that page. I have no idea how you could do this, but people with experience of internet tecchnology may be able to suggest something useful.
It's time for a new signature.
|
|
|
|
|
That might be considered "phishing".
The easy way? Change the HOSTS file to point to your site
I are Troll
|
|
|
|
|
Why would you want to do this? Hijacking the users intentions like this seems to be the sort of thing which is best described as malware.
Steve
|
|
|
|
|
please help, need to access CListBox on ATL Form
CListBox* lb;
HWND w=frm->GetDlgItem(IDC_LIST1);
lb=(CListBox*)w;
lb->AddString(s);
I understand that CWnd and CWindow are quite different things, but still have no better idea (
|
|
|
|
|
You cannot cast a HWND to a CListBox* , there is no connection between the two; an HWND is a Win32 handle while a CListBox* is a pointer to an object of type CListBox which is a C++ class. You will need to use some different code to find the pointer to your object; if it's a property of your form then it should be fairly easy to find.
It's time for a new signature.
|
|
|
|
|
yes it`s property of my form.
I created ATL simple control, then add composite control to it, then drag list-box item from toolbox on it.
I need to access that listbox from static function where i have only pointer on this form
unsigned int __stdcall MyFunction(void* _pEl){
CMyDialog* frm=(CMyDialog*)_pEl;
// ???
myLstBox->AddString(L"whatever");
}
|
|
|
|
|
Solved:
HWND list =frm->GetDlgItem(IDC_LIST1); //Retrieves the list control from the window
TCHAR* w=L"whatever\0";
SendMessage(list, LB_ADDSTRING, 0, (LPARAM)w); //Should retrieve the data from the specified index
)))
|
|
|
|
|
I am moving our project from VS 2005 to VS 2010 and am running up against some linker errors. std::string being multiply defined is one issue, but I will take some more time to look into that one. The one I am really confused about is the std::string constructor.
We have been using
std::string abc(aCharArray, 20);
std::string anotherExample(aStdString.c_str(), 20);
without any problems. Now VS 2010 is giving me an unresolved external during linking. It is thinking I want the constructor std::string(const char*, unsigned int) which IS what I want. It used to be defined, and it does still seem to be defined. For some reason, updating to VS 2010, it is no longer linking, though. Is the implementation for this constructor perhaps missing? Anyone run into this or can anyone confirm the same issue? Thanks.
Resolving these is pretty easy, but I am left confused as to why it gets unresolved external.
|
|
|
|
|
I ran into something I don't understand. The following line is producing another unresolved link error. 'buf' is a std::string.
std::getline(stream, buf,'\n');
We have the same line of code in other projects that compile just fine. Below is the link error. To resolve the problem, I changed buf to a char[1024] and am calling stream.getline(buf, sizeof(buf), '\n'). But why am I getting this link error in the first place? The projects which compile fine are REQUIRED projects for the project giving me this problem. I don't know if the chain of links has something to do with this, but I thought I'd at least mention it.
18>SimpleMCSFile.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) 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> >::operator+=(char)" (__imp_??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z) referenced in function "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl std::getline<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_istream<char,struct std::char_traits<char> > &&,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,char)" (??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@$$QAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z)
|
|
|
|
|
Looks like you're not linking to the library that contains the definition. First thing I'd do is create a new console project and see if it works there. Something like this should do:
#include "stdafx.h"
#include <tchar.h>
#include <string>
#include <sstream>
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
using namespace std;
string source = "First line\nSecond line\n";
istringstream iss(source);
string line;
while (getline(iss, line))
{
cout << line << endl;
}
cout << endl;
return 0;
}
Steve
|
|
|
|
|
I just compiled this with my copy of VS2010 and it compiles and links fine. There must be something else in your configuration that is causing the problem.
It's time for a new signature.
|
|
|
|
|
Thanks everyone for the helpful input. It does seem like something strange with the project. I wrote a test console application and got no linker errors. And the same calls link in other projects within the Solution just fine. I compared projects and am unable to find a difference between a project that works and a project that does not work.
I am now trying to clean up code. The pre-compiled headers have includes for a ton of STL includes. I removed the one for string and am converting the headers and CPP files appropriately to see what happens.
Anyway, it does seem to be something odd with this project. Everything worked fine in VS 2005. We never upgraded to 2008 and now I'm converting to 2010.
EDIT: As a result of this exercise, I did run across several headers which were also including string, so I was able to clean those up.
modified on Monday, June 7, 2010 4:42 PM
|
|
|
|
|
Compare the project files using a diff tool.
Steve
|
|
|
|
|
Thanks again for the input.
Took me nearly two weeks, but I finally figured out the problem. It turns out we had two classes derived from std::string. I did not realize we had classes derived from std::string.
I had noticed in a smaller test case, adding a certain #include would show the problem. Removing the #include and things would compile/link just fine. Unfortunately, there is a HUGE trail of #include's in that one header. This led me to slowly move #include's out of headers into CPP files allowing me to narrow down which headers were causing a problem. Eventually I got things down to where I noticed one of the std::string-derived classes and I went, "Aha!". Changed it to a 'has a' and the problem went away.
|
|
|
|
|
Difference between Interface and dispInterface?
|
|
|
|
|
Beg, borrow or steal a copy of "Essential COM" by Don Box. It'll describe what COM interfaces are and how to use them. It'll also tell you all about dispatch interfaces, how they're just a particular type of COM interface and how to implement both types, as well as an "interesting" hybrid called a dual interface.
Cheers,
Ash
|
|
|
|
|
It is a good book on COM.
Steve
|
|
|
|
|
Interface is a general term. A dispinterface (Dispatch Interface) is an interface that meets special requirements, specifically dynamic invocation by scripting environments (see the IDispatch[^] interface).
Steve
|
|
|
|
|
Hello,
I was trying to compile and execute an example given into a tutorial. everything went right but when i tried to execute the Client program i had a failure message for QueryInterface of a COM supplied by a server COM.
Here is a link to the code [^]
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
it seems an error due to the DllRegister Servir (code 0x8007007e)
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Hi,
This error means that you are missing one of the dependencies.
Best Wishes,
-David Delaune
|
|
|
|
|
Not sure who gave me a 1 vote... but HRESULT 0x8007007e means "The specified module could not be found". if this is occuring during DLL registration then it is a missing dependency.
Best Wishes,
-David Delaune
|
|
|
|
|
Hello Everybody,
I'm currently studying the ATL/COM paradigm and i'm was asking a question.
What's the currently use of the ATL/COM components ? I know that it's used to bring or raise functions from one application to others using interfaces and Dll; but after reading some tutorials i was wondering why have i to do such manipulations and code implementations when we may do such operations unsing just DLLs.
I'm new on this paradigm and i hope to have a good answer to that question.
Thank you.
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Well COM was originally intended to be a solution for DLL Hell[^]. In the old days... when CompanyX updated a Microsoft distributable DLL... it would often break the application written by CompanyY. "The procedure entry point.. blah blah could not be located..."
So naturally the user would phone CompanyY and complain about the crash. At this point CompanyY would send the user the original DLL to fix the issue. One problem... now the application written by CompanyX no longer works. COM was suppose to fix the problem by allowing multiple versions of the same component to be installed on the system and be located using a GUID in the registry.
Fast forward to the modern era... we still have the DLL Hell problem... and the new solution is called WinSxS[^].
History lesson over, lets have this conversation again in 10 years and see whats changed.
Best Wishes,
-David Delaune
|
|
|
|
|
Well it seems that the COM is like a patch of ActiveX and may be is more significant when we talk about Avtivex with Internet and browsers than Applications. Anyway Thanks for your reply even if the idea about COMs and The Hell of Dlls still fuzzy
Thank You
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|