Quantcast
Channel: No Geek Here!
Browsing all 25 articles
Browse latest View live

How to get the last modified date of a file in C++?

On Win32 platform, you can get the attribute information of a file easily by just calling GetFileAttributesEx().The information you got includes creation time, last access time, and last write time...

View Article



How to correctly call HttpOpenRequest() with specified accept types?

Windows API: (Wininet)HINTERNET HttpOpenRequest(  __in  HINTERNET hConnect,  __in  LPCTSTR lpszVerb,  __in  LPCTSTR lpszObjectName,  __in  LPCTSTR lpszVersion,  __in  LPCTSTR lpszReferer,  __in...

View Article

fatal error RC1015: cannot open include file 'activex.ver'.

Error Message:fatal error RC1015: cannot open include file 'activex.ver'.When compile the DirectShow filter sample in DXSDK, you may get the above error message.Root Cause:The resource file(.rc)...

View Article

A clear explanation of CoInitialize() and CoUninitialize()

As you know, when you are using DirectShow or the other COM-based components, the first thing you have to do is calling CoInitialize() to initialize the COM library.Furthermore, there are several rules...

View Article

More explanation of CoInitialize() and CoUninitialize()

In this article, I'll not talk about how it works about the COM's apartment model, but the coding practice.CoInitializeEx() provides the same functionality as CoInitialize() except it provides a...

View Article


How To: STL String Case-insensitive Compare

This article is talking about how to do a case-insensitive compare for STL string and wstring, there're 2 ways to reach the goal.Method #1: C Run-time Library - _stricmp() and _wcsicmp()#include...

View Article

How To: Toggle / Next Bookmark in Visual C++

Bookmarking is a very useful feature of Visual C++ when you are coding, but the keyboard short cuts of this function is hard to remember. In the menu, you can find the short cuts of toggle and next...

View Article

FORMAT_VideoInfo v.s. FORMAT_VideoInfo2

If the media type is FORMAT_VideoInfo, it means the format buffer is a VIDEOINFOHEADER struct; if the media type is FORMAT_VideoInfo2, it means the format buffer is a VIDEOINFOHEADER2 struct. So,...

View Article


Why is the media sample upside down after convert its buffer data from YUV to...

QuestionI converted the buffer of a media sample from YUY2 to RGB24 pixel by pixel, and then I got a upside-down image. What's wrong with it?AnswerThe definition of the biHeight field of...

View Article


error C3861: 'CoInitializeEx': identifier not found, even with...

You may get the following errors when trying to call CoInitializeEx(NULL, COINIT_MULTITHREADED). error C2065: 'COINIT_MULTITHREADED' : undeclared identifiererror C3861: 'CoInitializeEx': identifier not...

View Article

Where can I find the list of installed ACM codecs on Vista?

It has moved to a strange place on Vista. Do the following steps to see the list:1. Click on Windows Media Player 11 -> Help -> About -> Technical Support Information2. It will generate...

View Article

Read/Write Windows Registry on Windows 64-Bits Platforms

On Windows Vista 64-bits, there's a 32-bits emulator called WOW64 for 32-bits applications. A 32-bits application running on WOW64 uses the registry redirector, because the 64-bit version of an...

View Article

How To: Determine whether a 32-bits application is running on Windows 64-bits...

WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows.Sample Code:bool IsRunningOnWow64(){  BOOL bIsWow64 = FALSE;  BOOL (WINAPI...

View Article


How To: Detect Windows Media Center Version

If your program is depending on a specified version of Windows Media Center, just try the following code to identify Windows Media Center versions.Sample Code://// Get Windows Media Center version from...

View Article

Why will WCF client be disconnected after the connection idles for a long time?

The default receive timeout is 10 minutes, so WCF client will be disconnected after the idle time exceeded that limitation. What can I do if the connection needs to be kept alive?Solution #1 - Server...

View Article


How To: Handle dynamic format change in ReceiveConnection function on a...

I was trying to correctly handle dynamic format change on my video null renderer and had fought against it for several days.The following code snippet is my final work for handling dynamic format...

View Article

How To: Extracting the embedded album art from a MP3 / WMA

I'm using Windows Media Sync Reader in Windows Media Format SDK to get the album art from id3 tag of a MP3, it can also get from a WMA.Code Snippet:#include <windows.h>#include...

View Article


Image may be NSFW.
Clik here to view.

Windows Media ASF Viewer

Windows Media® ASF Viewer 9 Series is a tool for inspecting the contents of files (such as .asf. .wma, and .wmv file) to make sure they meet the requirements of the Advanced Systems Format (ASF)...

View Article

How To: A Web Page Interacts with a Embedded Web Browser Control

If your application contains a web browser control to show certain web page, can the web page interact with your application by script language? Yes, it can. There's a sample on MSDN, it's very short...

View Article

Read/Write Windows Registry on Windows 64-Bits Platforms (C# Version)

AbstractionHow does a 32-bits(x64) program running on Windows 64-bits(x64) access the 64-bits registry? In C#, you can use P/Invoke to call RegOpenKeyEx function with KEY_WOW64_KEY to access the...

View Article
Browsing all 25 articles
Browse latest View live




Latest Images