웹, HTML 71

자신의 ip 알아내기 참조

/* 프로그램명 : 에코 서버(Echo Server) 프로그래머 : 김은철 저 작 권 : 이 프로그램은 개인의 학습 목적으로만 사용할 수 있으며, 상업적 목적으로 사용할 수 없습니다. 홈페이지 : http://cafe.naver.com/pplus 이 메 일 : polarisgsi@freechal.com, eunchol71@naver.com */ #include #include #include // ws2_32.lib를 링크 시 사용 #pragma comment( lib, "ws2_32.lib" ) void ErrorDisplay( char *szError ); void main( void ) { int ret; // //.// 소켓 초기화 // /* 함수 : int WSAStartup( WORD wVer..

웹, HTML 2009.10.04

Ftp 이어 받기, 이어 올리기 구현할 때

먼저 서버측에서 지원을 해야 된다.... 지원 여부는 아래 FtpCommand 실행시 리턴값 체크하면 된다. ------------------------------ // 이게 서버로 가면 이어받기/쓰기 모드로 돌입한다. TCHAR szCommand[256]; wsprintf(szCommand, _T("REST %I64d"), nFileSize); // 파일크기만큼 이동시키면 이어모드~~~임의 설정가능 BOOL bRes=FtpCommand(hConnect, FALSE, FTP_TRANSFER_TYPE_BINARY, szCommand, 0, NULL); ~~~~~~~~ InternetReadFile(받을 때)이나 InternetWriteFile(올릴 때) 사용 --------------------------..

웹, HTML 2009.10.03

IOleContainer 를 가지고 enum 객체 생성해 다수의 웹브라우저 컨트롤 구해보는 소스

The following code demonstrates how to access the WebBrowser Object Model of frames in an HTML page to refresh the contents of each frame. The most important piece of the code uses the IOleContainer::EnumObjects method of the HTML Document object to enumerate embeddings on the page. Each of these embeddings represents a control on the page. By querying each control object for IWebBrowser2, this ..

웹, HTML 2009.09.28

IHTMLWindow2->get_document가 E_ACCESSDENIED를 뱉는 경우(아래와 다른 해결방법)

IHTMLWindow2的get_document方法有时候会返回E_ACCESSDENIED2009年2月20日 由 阿华 留言 » IHTMLWindow2的get_document方法有时候会返回E_ACCESSDENIED 当一个page有多个sub frame的时候,如果frame的src在不同的domain上,就会返回这个错误,真是郁闷,在网上找了一些资料,没用太多有用的信息,最后还是MSDN解决问题,呵呵 解决的办法就是通过 IWebBrowser2 的 IOleContainer 接口访问所有的frame,代码如下 HRESULT CBhoOfPopBars::GetSelectionByOleContainer( CString& selText, CRect& selRect ) { // Get the IDispatch of the main document..

웹, HTML 2009.09.28

IHTMLWindow2::get_document returns E_ACCESSDENIED 뱉을 경우

IHTMLWindow2 *pWin~~~~ // 유효한 인터페이스가 존재하는 경우, 도큐먼트를 구할 시 다음과 같이 두 경우 고려 처리하면 된다. if(S_OK == (hr=pWin->get_document(&pDocFrame))){ // 제대로 구해지면 여기서 프레임 도큐먼트를 가지고 작업 //~~~~~~~~ pDocFrame->Release(); } else if(hr == E_ACCESSDENIED){ // 옆의 에러 발생시 아래와 같은 처리 IServiceProvider *pSP=NULL; IWebBrowser2 *pWBSub=NULL; if(S_OK == pWin->QueryInterface(IID_IServiceProvider, (void**)&pSP)){ if(S_OK == pSP->Query..

웹, HTML 2009.09.28

ShellExecute,WinExec,CreateProcess (IE 실행방법)

ShellExecute,WinExec,CreateProcess (IE 실행방법) 1. 레지스트리 경로 \software\microsoft\windows\currentversion\app paths\IEXPLORE.EXE 에 보시면 iexplorer.exe 패스가 나옵니다. win9x, winMe, win2k 동일합니다. spath는 설치된 경로, surl은 http://www.yahoo.co.kr/ 모두 문자열입니다. STARTUPINFO si; PROCESS_INFORMATION pi; memset(&si,0,sizeof(STARTUPINFO)); sprintf(cmd,"%s %s",spath,surl); CreateProcess (NULL,cmd,NULL,NULL,true, NORMAL_PRIORIT..

웹, HTML 2009.07.25

HTMLElement 객체/ Event - JavaScript -

HTMLElement 객체/ Event - JavaScript - 2007/09/14 14:22 http://blog.naver.com/rakis77/70022030743 이 포스트를 보낸곳 () --- HTMLElement 객체의 프로퍼티 --- all ⓔ 특정한 HTMLElement 객체에 포함된 모든 태그들의 컬렉션 align ⓔ Block 효과를 가지는 태그의 align 속성을 가리키는 객체의 속성 className 스타일시트의 Selector로 사용하기 위해 태그에 사용된 class 속성의 값 children ⓔ 특정한 태그에 1차적으로 포함되어 있는 HTMLElement 객체들의 컬렉션 clientHeight 객체에 적용된 여백과 테두리, 스크룰바를 제외한 높이 clientWidth ⓔ 객체에..

웹, HTML 2009.07.21

웹페이지 프레임 포함 전체 소스 추출

// 깔끔하게 만들려고 노력했다. // 에러처리 완벽하게 할려고 했다. /* // LPWSTR lpszSource; // WCHAR 포인터(유니코드 문자열) 변수 할당 if(GetHtmlSource(pDoc, &lpszSource)){ // 성공여부 체크 //ClipBoardTextCopyW(lpszSource); // 필요한 작업~~~~ //..... //.... //... free(lpszSource); // ★ 작업이 끝나면 반드시 해제하자 } */ int __stdcall GetHtmlSource(IHTMLDocument2 *pDoc, LPWSTR *ppszText) { int iRunCount = 0; // 함수 실행 횟수 제한키 위해 int iSuccessCount = 0; // 성공적으로 프..

웹, HTML 2009.07.08

마지막 다큐먼트컴플리트 호출시점 및 invoke 인수 제대로 받기(역순 주의)

http://www.devpia.com/MAEUL/Contents/Detail.aspx?BoardID=50&MAEULNo=20&no=605418&ref=605356 마지막 DISPID_DOWNLOADCOMPLETE 호출시점 | ATL 2006-09-18 오후 3:32:26 이재환 (kindlion) 번호: 605356 / 읽음:172 ATL을 이용하여 BHO로 작업중입니다. DISPID_DOWNLOADCOMPLETE 가 마지막으로 호출되는 시점을 알수 있을까요?? 프레임이 여러개인 페이지에서는 이 메세지가 여러번 들어오는걸로 알고 있습니다. 그래서 마지막으로 발생되는 시점을 알고 싶습니다. [답변][참고] 2006-09-18 오후 5:27:50 이광진 (mirjini) 번호: 605406 안녕하세요.....

웹, HTML 2009.07.05