Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
L

Lane Yu

@Lane Yu
About
Posts
32
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Error info of FileSystemObject
    L Lane Yu

    I think the common way of using FormatMessage is like this: LPWSTR pwszMsg = NULL; FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL,hr, 0, (LPWSTR)&pwszMsg, 0, NULL); How can I know which DLL to point and generate correct message? Thanks.

    COM question testing beta-testing help

  • Error info of FileSystemObject
    L Lane Yu

    I try to use FileSystemObject in VC6 via "#import "scrrun.dll"" IFileSystemPtr spFso(__uuidof(FileSystemObject)); ISupportErrorInfoPtr spSupportE = spFso; HRESULT hrRet = spFso->raw_MoveFolder(_bstr_t(pwszSrc), _bstr_t(pwszDst)); For testing, I assigned pwszSrc and pwszDst with invalid paths. I find that IFileSystem does not support ErrorInfo coz the interface pointer in spSupportE is NULL. The value of hrRet is 0x800a004c, which can not be processed by FormatMessage(). So after MoveFolder() fails, I can't get any error message. However, I used VB to call the same function and got error message "Path not found". How does VB do that? How can I get the same message in VC?

    COM question testing beta-testing help

  • Structured exception vs C++ exception
    L Lane Yu

    Thank you. I'm using VC6.

    C / C++ / MFC c++ visual-studio tutorial question

  • Check Numeric value
    L Lane Yu

    Try to use CRT function isdigit() or Windows API GetStringTypeEx().

    C / C++ / MFC c++ question help

  • C++ Date formats
    L Lane Yu

    You can use CRT function mktime() to make a time_t, and then you can do everything you want. Take a look at CTime's source. (c:\Program Files\Microsoft Visual Studio\VC98\MFC\SRC\TIMECORE.CPP ) :)

    C / C++ / MFC c++ visual-studio com json tutorial

  • Structured exception vs C++ exception
    L Lane Yu

    But in my testing program, all kinds of exceptions including zero-dividing or NULL pointer can be caught by catch(...). Why? Does that mean we can always use C++ try/catch in C++ programs?

    C / C++ / MFC c++ visual-studio tutorial question

  • Structured exception vs C++ exception
    L Lane Yu

    How to rasie a exception that can only be caught by __try/__except, but cannot be caught by try/catch? In a Windows application written by VC. What time to use structured exception instead of C++ exception?

    C / C++ / MFC c++ visual-studio tutorial question

  • CDO internalization issue. Help!
    L Lane Yu

    I'm trying to generate .eml files with CDO 2000. But I got problems if the attachment's file name contains multi-lauguage characters. Then the attachment name will become ???????. I tried two ways: 1. Set the file name directly with raw text. 2. Encoding the header (content-disposition) with RCF1522. But I still got the same result. Actually, I can call GetFileName() to retrieve the filename before writing stream to file, and it was fine. But something wrong happened when it generates the file. Thanks a lot.

    COM help question

  • Help! Download file dialog box has garbage words in ASP!
    L Lane Yu

    We use following code to show a download file dialog box: .... Response.ContentType = cmt Response.AddHeader "Content-Disposition", "inline; filename=" & fn & "" Response.BinaryWrite stm.Read Response.End If the file name (fn) cotains non-ascii characters, the file name in the download file dialog box will contain garbage words. Actually, the variable fn's value is awalys correct when I was debugging in VS. However, once the dialog box shows, the file name turns into wrong characters. I have tried to modify Response.ContentType, Response.CharSet and Response.Codepage, but the problem still exists. Current ASP page file is UTF-8. BTW, I know little about ASP or web development. Thanks a lot. Lane Yu

    Web Development help visual-studio

  • Remote capture SharePoint?
    L Lane Yu

    Our team is developing a product which can capture documents and other data from SharePoint sites. So far we know we can do this with SharePoint SDK, but our program has to be installed on the SharePoint server, or at least in the Server Farm. Thus it's very inconvenient to deploy the product. We would like to know if there's a way to capture the data remotely. That is, can we capture all the SharePoint servers from a central server? BTW, is it possible that we can know which machine has SharePoint server installed by scanning the AD? Thanks a lot.

    Web Development sharepoint sysadmin collaboration question

  • Remote capture SharePoint?
    L Lane Yu

    Our team is developing a product which can capture documents and other data from SharePoint sites. So far we know we can do this with SharePoint SDK, but our program has to be installed on the SharePoint server, or at least in the Server Farm. Thus it's very inconvenient to deploy the product. We would like to know if there's a way to capture the data remotely. That is, can we capture all the SharePoint servers from a central server? BTW, is it possible that we can know which machine has SharePoint server installed by scanning the AD? Thanks a lot.

    C# sharepoint sysadmin collaboration question

  • Custom control problem
    L Lane Yu

    Because when your class is ready to handle messages, the control has already been created. So you should insert your initlizing code in PreSubClassWindow().

    C / C++ / MFC help

  • printing problem on a graph control
    L Lane Yu

    Are u using MFC's Print & Print Preview functions?

    C / C++ / MFC data-structures help

  • why to put extern C before const IID?
    L Lane Yu

    I'm a beginner of COM. I just saw some sample codes: DictionaryObj.cpp extern "C" const IID IID_Dictionary = { 0x54bf6568, 0x1007, 0x11d1, { 0xb0, 0xaa, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00} } ; I don't understand the purpose of extern "C". Since IID_Dictionary will not be exported, why to use this prefix? Thanks.

    COM c++ com question learning

  • Which function is like "getch()" in Console App?
    L Lane Yu

    I see. I'm a begginer of C#. So far I don't know how to call a Windows API. So I think I should learn more firstly. Thanks all of you.:-D

    C# csharp question

  • Which function is like "getch()" in Console App?
    L Lane Yu

    But Console.Read() is not as getch(). I only want a single char from keyboard without echo. :confused:

    C# csharp question

  • Which function is like "getch()" in Console App?
    L Lane Yu

    You mean i'm helpless unless downloading Framework2.0?:sigh:

    C# csharp question

  • Which function is like "getch()" in Console App?
    L Lane Yu

    Hi, i'm starting to learn C#.:laugh: I want to output a pause(such as "press any key to continue...") in a console application. I just need a function like "getch()" in C language. Which object and method to use? Thanks.

    C# csharp question

  • How to convert _bstr_t to wchar_t*
    L Lane Yu

    In fact, _bstr_t has a overloaded operator: (wchar_t*). _bstr_t bstrTest(L"Hello, xiujie."); wchar_t* pwszTest = (wchar_t*)bstrTest; //explicit

    COM help tutorial question

  • How to init this VARIANT?
    L Lane Yu

    I have tried out one way to enumerate sub folders: ... CComPtr<IUnknown> qUnkown; qSubFolders->get__NewEnum(&qUnkown); if (qUnkown == NULL) { cout << "Fail to query _NewEnum!" << endl; return; } CComQIPtr<IEnumVARIANT> qEnumVT = qUnkown; if (qEnumVT == NULL) { cout << "Fail to query IEnumVARIANT!" << endl; return; } for (INT nLoop = 0; nLoop < nCount; nLoop++) { CComVariant vtEnum; qEnumVT->Next(1, &vtEnum, NULL); if (vtEnum.vt == VT_DISPATCH) { CComQIPtr<IFolder> qFolder = vtEnum.pdispVal; //Query IFolder vtEnum.pdispVal->Release(); if (qFolder != NULL) { CComBSTR bstrPath; qFolder->get_Path(&bstrPath); ... } } } However, how to use property "Item" in VC is still a question. Thank you.:) -- modified at 12:58 Monday 7th November, 2005

    COM c++ tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups