|
Taking advantage of EFS (Encrypted File System) APIs in Win2K/XP
|
Total Hit (5073) |
The Encrypted File System, or EFS, was introduced in version 5 of NTFS to provide an additional level of security for files and directories. It provides cryptographic protection of individual files on NTFS volumes using a public-key system. Typically, the access control to file and directory objects
....Read More |
Rating
|
|
|
Redirect command line output to textbox using CreatePipe API
|
Total Hit (16685) |
This example illustrates a Visual Basic application starting another process with the purpose of redirecting that process's standard IO handles. The Visual Basic application redirects the created process's standard output handle to an anonymous pipe, then proceeds to read the output through the pipe
....Read More |
Rating
|
|
|
|
Working with Crypto API to encrypt/decrypt text
|
Total Hit (26076) |
This article uses the CRYPTOAPI sample application to demonstrate how to decrypt or encrypt data.
For more information check MSDN article
«b»«a href='http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncapi/html/msdn_cryptapi.asp'»MSDN Article : The Cryptography API, or How to
....Read More |
Rating
|
|
|
|
Interprocess communication using DDE (Dynamic Data Exchange) - Part1
|
Total Hit (16692) |
Microsoft Windows provides several methods for transferring data between applications. One method is to use the Dynamic Data Exchange (DDE) protocol. The DDE protocol is a set of messages and guidelines. It sends messages between applications that share data and uses shared memory to exchange data b
....Read More |
Rating
|
|
|
Interprocess communication using DDE (Dynamic Data Exchange) - Part2
|
Total Hit (10073) |
In our previous article «b»«a href='CodeDetail.aspx?CodeId=3767'»Interprocess communication using DDE (Dynamic Data Exchange) - Part1«/a»«/b» of this this series we learned about basic concept of DDE and we also saw that how to implement DDE Server using DDEML Apis. Now in this article I will show y
....Read More |
Rating
|
|
|
Appending One File to Another File
|
Total Hit (3933) |
The following example demonstrates opening and closing files, reading and writing files, and locking and unlocking files. The application appends one file to the end of another file. The application opens the file having the new data appended with permissions that allow only this application to writ
....Read More |
Rating
|
|
|
|
|
Enumerating all available Clipboard formats
|
Total Hit (8020) |
Sometimes in your application you might want to check if any Clipboard data available and if available then in which format. You can check format of clipboard data and you can enable/disable menu options based on available clipboard data formats. For example in timer event you can check for CF_BITMA
....Read More |
Rating
|
|
|
How to get/set list of files copied in to clipboard using API
|
Total Hit (6141) |
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Add one drive control, one dir control, one file control, three command button controls and one timer control. Set MultiSelect=True for File control
- Add the following code in form1
«code LangId=1»Option Explicit
' Required data
....Read More |
Rating
|
|
|
Realtime Clipboard viewer (Subclassing technique)
|
Total Hit (15897) |
The clipboard is a set of functions and messages that enable applications to transfer data. Because all applications have access to the clipboard, data can be easily transferred between applications or within an application. In this article you will learn various techniques to develop fully function
....Read More |
Rating
|
|
|
How to run system clock slower/faster ?
|
Total Hit (7671) |
In this article we will have lots of fun with system clock. I will explain you how to retrive and change your system clock setting to make your system clock slower/faster using SetSystemTimeAdjustment and GetSystemTimeAdjustment APIs. You will also learn how to assign special privilege to an applica
....Read More |
Rating
|
|
|
How To Use the ADO SHAPE Command
|
Total Hit (3335) |
This article describes the ADO SHAPE command syntax for producing hierarchical recordsets, and explains how to traverse hierarchical recordsets. VBA sample code is also provided.
|
Rating
|
|
|
Create your own cursor at runtime
|
Total Hit (3319) |
Sometimes you might need to create your own cursor at runtime without using any image or resource. You can achive this functionality using CreateCursor API. Here is the basic guidelines for creating your own cursor.
When you call CreateCursor you have to pass Application handle, Cursor Width, Curso
....Read More |
Rating
|
|
|
Monitoring folder activities
|
Total Hit (3198) |
In this article I will show you how to use FindFirstChangeNotification, FindNextChangeNotification, FindCloseChangeNotification and WaitForSingleObject API. Unfortunately these all APIs can only give you indication of event but they do not tell you which file/folder has been changed and what event o
....Read More |
Rating
|
|
|
Sharing Data Between Processes Using Memory-Mapped Files
|
Total Hit (16706) |
Memory-mapped files provide a way to look at a file as a chunk of memory. This feature is very useful in languages that support examining memory at arbitrary addresses. You map the file and get back a pointer to the mapped memory. You can simply read or write to memory from any location in the file
....Read More |
Rating
|
|
|
|
|
How to change printer port using API ?
|
Total Hit (4494) |
«code LangId=1»Option Explicit
Private Type PRINTER_DEFAULTS
pDatatype As String
pDevMode As Long 'DEVMODE
DesiredAccess As Long
End Type
Private Declare Function GetPrinter Lib "winspool.drv" Alias "GetPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, pPrinter As Long
....Read More |
Rating
|
|
|
Working with Region API
|
Total Hit (4620) |
A region is a rectangle, polygon, or ellipse (or a combination of two or more of these shapes) that can be filled, painted, inverted, framed, and used to perform hit testing (testing for the cursor location).
From this article you will learn
- Creating regions of different shapes (i.e rectangl
....Read More |
Rating
|
|
|
|
|
Move Form without title bar (2 different methods)
|
Total Hit (3991) |
You can move a form which has no titlebar by 2 different methods. First method will not show any drag border while second method will show drag borders.
«code LangId=1»'//////////////////////////////////////////////////////////
'// Move Form Without Title bar (Method-1: Without drag border)
'////
....Read More |
Rating
|
|
|
|
Working with Basic Filled Shapes using GDI API
|
Total Hit (5827) |
Filled shapes are geometric forms that are outlined by using the current pen and filled by using the current brush. There are five filled shapes:
«UL»«LI»Ellipse
«LI»Chord
«LI»Pie
«LI»Polygon
«LI»Rectangle «/UL»
Applications use filled shapes for a variety of tasks. Spreadsheet applicat
....Read More |
Rating
|
|
|
|
Stored procedure to set/reset columns's identity property
|
Total Hit (3447) |
You can use ALTER TABLE statement to add/remove column and to change some attributes of a column but there are some limitations with ALTER TABLE statement. You can not use ALTER TABLE to set a column as an identity column (Auto Increment field). You can ADD a new column with IDENTITY property but ca
....Read More |
Rating
|
|
|
Working with file time APIs
|
Total Hit (9628) |
The date and time functions retrieve and set the date and time for the system and individual files.
There are five time formats. Time-related functions return time in one of these formats. You can also use the time functions to convert between time formats for ease of comparison and display. The
....Read More |
Rating
|
|