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
G

gUrM33T

@gUrM33T
About
Posts
115
Topics
24
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Popularity Calculation
    G gUrM33T

    Some time back I remember, somebody posted an article on Popularity Calculation on CP that I'm not able to find using the CP's search engine X|. Can anyone point me to that article please?

    The Lounge question

  • Multiple Inclusion
    G gUrM33T

    Any COM expert here? Please help! Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    COM c++ help html com tutorial

  • Multiple Inclusion
    G gUrM33T

    I've a MTS/COM+ component (COMPONENT_1) that #imports ADO library. And, I have another MTS/COM+ component (COMPONENT_2) that #imports this component (i.e. COMPONENT_1). I need to use ADO objects in my second component (COMPONENT_2) too. If I use #import in my second component, I get lots of errors. If I do not, the MIDL compiler remains unable to recognize _Recordset data type. Or, lets say that I do not use ADO in my second component at all i.e. I use IDispatch instead of _Recordset pointers to receive recordsets. This solves the problem but gives birth to a new problem. ADO recordsets loose their current position i.e. it moves to the first record if type casted to IDispatch pointers. I dont know why. Can anyone please show me how to do it? I am using ATL with Visual C++ 6.0 SP5. Thanks Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    COM c++ help html com tutorial

  • MSDataShape Error
    G gUrM33T

    SHAPE {EXEC sp_S_Events} APPEND ({SELECT * FROM attendees WHERE event_id=?} RELATE event_id TO PARAMETER 0) AS rsAttendees From a method (namely, GetEvents) of my COM+ business layer component (written in Visual C++ 6.0 SP5), I am issuing the statement given above but it fails with an error saying: Error 0x80004005: The data provider or other service returned an E_FAIL status. However, the same statement works perfectly fine when executed from within a program of Visual Basic. A small portion of code from my COM+ component is given below:

    STDMETHODIMP CBizLayer::GetEvents(/*[in]*/ long EventID, /*[out, retval]*/ VARIANT *pDataset) {
    _ConnectionPtr spConn;
    _RecordsetPtr spDataset;
    try {
    .
    . // instantiate an ado connection and an recordset object
    .
    spConn->Provider = L"MSDataShape";
    spConn->Open(szConnect, _bstr_t(), _bstr_t(), -1);

    spDataset->PutRefActiveConnection(spConn);
    spDataset->PutCursorLocation(adUseClient);
    spRS->Open(szShapeCmd, vtMissing, adOpenForwardOnly, adLockReadOnly, adCmdText);
    spRS->PutRefActiveConnection(NULL);

    ::VariantClear(pDataset);
    V_VT(pDataset) = VT_DISPATCH;
    V_DISPATCH(pDataset) = (IDispatch*)(spDataset.Detach());

    m_spObjectContext->SetComplete();
    _hr = S_OK;
    }
    catch(const _com_error &ex) {
    [...]
    }
    catch(...) {
    [...]
    }

    I've tried to debug my component and I found out that the call to CBizLayer::GetEvents() method completes without any error (i.e. with an HRESULT of S_OK), but in the client application, I still receive this error :wtf: :wtf:. Why? What could be the reason? I am totally confused! Please help! Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    Database c++ help html com

  • Weapons of Mass Destruction
    G gUrM33T

    Try this on Google search soon before someone asks Google to fix it. Open Google.com, type "weapons of mass destruction" (without quotes) and click I'm Feeling Lucky button instead of Google Search. Very Cool :laugh: Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge help c++ html com question

  • Fingerprint and Signature Recognition
    G gUrM33T

    I googled for "fingerprint SDK" (with quotes) and the first result was an SDK from IBM. Its overview says "The IBM Fingerprint SDK is independent of the actual sensor used." Can this SDK be used in my project? Even if it can be, I'm not able to find out any SDK download page. Any more info on it? Also check out the first few results, there are some more sensor-independent SDKs available ( http://www.bioenabletech.com/fingerprints_software_development_kit.htm [^]) but no options for download. Thanks Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge c++ html com help question

  • Fingerprint and Signature Recognition
    G gUrM33T

    Thank you for instant reply. What about commercial apps? Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge c++ html com help question

  • Fingerprint and Signature Recognition
    G gUrM33T

    I need to develop a project that can benefit from these two technologies. But I never tried my hands on any biometric solution before. Can anyone of you please help? What I need to know is that a) is there any recognition SDK available or what? b) are there any free open source SDKs too? c) how easy is to integrate one into our own applications? Any help will be greatly appreciated. Thanks Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge c++ html com help question

  • Where is my prize?
    G gUrM33T

    WTF is the use of this voting thing if you are never gonna get the prize this site promises? X| I am the prize winner for the month of March 2004, but i've never been contacted after that. This is what was written in the mail I received from Chris Maunder on May 04, 2004. ------------------------------------------- From : Chris Maunder <chris at codeproject dot com> Sent : Tuesday, May 04, 2004 5:23:54 AM To : <gomzygotit at hotmail dot com> Subject : Congratulations from CodeProject! Hi Gurmeet, Congratulations! You have won the CodeProject article competition for March. Category : MFC / C++ Article : HTML Reader C++ Class Library Location : http://www.codeproject.com/library/GomzyHTMLReader.asp Prizes : Dundas Grid 6.1 from Dundas Software. Value: $399 Visual Assist .NET from Whole Tomato. Value: $79 In total you have won $478 in prizes. Well done! The companies donating the prizes have been notified and will be in contact you soon. Again - thanks for your contribution to the CodeProject community. Chris Maunder www.codeproject.com ------------------------------------------- Can you please explain whatz goin on Chris. Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge c++ csharp html css com

  • Changing Size Font and Vertical Scroll Bar
    G gUrM33T

    Before a call to the device context functions, you need to select the graphics object(s) you need to work with; in your case, a CFont object. Write the following statements before and after a call to the DrawText(...) function respectively: Before CFont *pOldFont = dc.SelectObject(&font); After dc.SelectObject(pOldFont); Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    C / C++ / MFC question help tutorial

  • Extracting files from resource
    G gUrM33T

    So where exactly are you facing problem in this code? How are you going to know where the error occured as: - Your code never calls GetLastError() to find out if a call to WIN32 Resource API succeeded or not. - FindResource(), LockResource() and LoadResource() returns NULL in case of an error, you are not even performing any checks for that condition too. - Are you sure the call to CreateFile() is succeeding, try using GetLastError() to know why it failed. - You are not comparing the value of variable Written with the variable Size to know exactly if a call to WriteFile() succeeded or not. Points regarding your code: 1. Please move UnlockResource() out of the if block. 2. It is not necessary for Win32-based applications to FreeResource. A resource is automatically freed when its module is unloaded. Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    C / C++ / MFC help learning

  • Hey Ya
    G gUrM33T

    Roger Wright wrote: I hope you didn't open it... No I Didn't :) Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge c++ html com help question

  • Hey Ya
    G gUrM33T

    Just found a mail in my inbox from webmaster@codeproject.com with the subject "Hey Ya =))". The body contains:

    I don't bite, weah!

    password -- 80780

    It also contains the attachment Readme.zip that contains a screensaver file. Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge c++ html com help question

  • VS.NET 2003 Internal Compiler errors
    G gUrM33T

    Anders Molin wrote: What about a rebuild, does that fix it? Got the same error a few days back but a rebuild fixed it. Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge help visual-studio csharp html asp-net

  • String vs string
    G gUrM33T

    string is an alias for System.String in the .NET Framework. Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    C# csharp visual-studio question

  • Text Readers, Streams, *ugh*
    G gUrM33T

    What, according to you, can be done to make it more efficient? Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    C# csharp help question c++ html

  • Text Readers, Streams, *ugh*
    G gUrM33T

    Your solution suggests using BaseStream, property of StreamReader class. But I don't only need to deal with files, I need to deal with strings also. The StreamReader class has a BaseStream property but the StringReader class does not. What do you suggest in this case? Moreover, I would like to ask you whether the "alternate way" that I've posted above is right according to you in this situation or not. Thanks, Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    C# csharp help question c++ html

  • Text Readers, Streams, *ugh*
    G gUrM33T

    ... but I'm not sure if its the right one. Now my class looks like this:

    public class LiteHTMLReader
    {
    private System.IO.Stream oHtmlStream;

    public long Read(string htmlText)
    {
    using (this.oHtmlStream = new System.IO.MemoryStream(System.Text.Encoding.Unicode.GetBytes(htmlText)))
    {
    long lCharCount = this.parseHTMLDocument();
    return (lCharCount);
    }
    }

    public long ReadFile(string pathToFile)
    {
    using (System.IO.StreamReader sr = new System.IO.StreamReader(pathToFile, true))
    {
    string strFileData = sr.ReadToEnd();
    return (this.Read(strFileData));
    }
    }
    }

    I dunno why but I dont think this is the actual way to do it. Can someone clear my doubts? Heath Stewart, Mike Dimmick, any other C# guru, where are you guyz? Please help. Thanks, Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    C# csharp help question c++ html

  • ?? Protector ??
    G gUrM33T

    Howcome Heath and Nick got the status of CodeProject Protector? What does it actually mean? Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    The Lounge c++ html com help question

  • Text Readers, Streams, *ugh*
    G gUrM33T

    Hi, while writing a .NET port of my HTML Reader Class Library[^] using C#, I'm kinda stucked with a stupid problem. You may be knowing that the library allows to read HTML text both from in-memory strings and disk files. At first I declared a private field of type System.IO.TextReader in my LiteHTMLReader class (the main class of the library) and defined a Read function with 1 overload. Some portion of the class looked like this:

    public class LiteHTMLReader
    {
    private System.IO.TextReader oHtmlReader = null;

    public long Read(string htmlText)
    {
    oHtmlReader = new StringReader(htmlText);
    return (parseHTMLDocument()); // parseHTMLDocument is a private function
    }

    public long Read(string pathToFile, System.Text.Encoding encoding)
    {
    oHtmlReader = new StreamReader(pathToFile, encoding, true);
    return (parseHTMLDocument());
    }
    }

    But soon enough, I learned that readers (derived from System.IO.TextReader) are just forward-only. But sometimes while parsing an HTML document, I need to move back also. So, I rejected the idea of using readers. So obviously, my next option was using streams. Ok now we have a System.IO.FileStream class to deal with files, but what about the strings. - How can I open a stream on a string? - Is there any class available in the framework? - Shall I go for my own implementation? - Any other better option availble for the above-defined scenario? Please suggest. Even if I use streams, there is one more thing I need to know. Streams deal with bytes only (GetBytes). String class uses Unicode by default. How to deal with this situation? Guys, I'm so sorry for asking soooooo much but you can obviosly guess that I'm a newbie in C#. And I'm getting mails daily from different people requesting me to release a .NET port of the library. Please help. Any suggestions are welcome. Regards, Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class

    C# csharp help question c++ html
  • Login

  • Don't have an account? Register

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