473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Win Kernel32.CreateFile() return value

bartonc
6,596 Expert 4TB
I'm translating some C code into Python and have (what might be) a (stupid) question:

Win Kernel32.CreateFile() returns Handle, which is declared as Void *.

So, does that mean that the underlieing data structure is totally hidden and there is no need for that handle to point to an actuall object in my application?
Apr 14 '07 #1
3 3136
bartonc
6,596 Expert 4TB
I'm translating some C code into Python and have (what might be) a (stupid) question:

Win Kernel32.CreateFile() returns Handle, which is declared as Void *.

So, does that mean that the underlieing data structure is totally hidden and there is no need for that handle to point to an actuall object in my application?
OK, now my system doesn't find CreateFile in Kernel32. I'm searching MSDN at this moment, but that's where I got my original guess. Does anybody know which dll or lib I should be loading?
Apr 15 '07 #2
bartonc
6,596 Expert 4TB
OK, now my system doesn't find CreateFile in Kernel32. I'm searching MSDN at this moment, but that's where I got my original guess. Does anybody know which dll or lib I should be loading?
OK. I got this one: CreateFile() is and alias for CreateFileA(), so I've got that straightened out. But the original query still stands.
Apr 15 '07 #3
bartonc
6,596 Expert 4TB
I'm translating some C code into Python and have (what might be) a (stupid) question:

Win Kernel32.CreateFile() returns Handle, which is declared as Void *.

So, does that mean that the underlieing data structure is totally hidden and there is no need for that handle to point to an actuall object in my application?
Never mind. I understand this to be true, now.
Apr 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: dim | last post by:
Copied directly from exaple book but not working.... All i get is an empty 0 byte file Call to GetLastError directly after the call to WriteFile returns 0 (NO_ERROR) but no data sees to be written...
0
by: Nitin Narang | last post by:
I have a piece of code which is moved to .NET VC7 recently from VC6 and there has been an apparent change in behavior using CreateFile/Writefile functionality. I am creating a file on a shared...
3
by: Antoine | last post by:
Hello, I'm writing a program to send requests to my wlan pocket pc device (UIO1: driver) in C#. Here how I import CreateFile functions from coredll.dll with DllImport: public static extern...
0
by: JohnnyBoy | last post by:
I am playing with a Microsoft code example that uses the creatFile call to open a stream to a serial COM port. When I execute the example, the createFile call fails with an error code 5...
2
by: Bob Gray | last post by:
Hi, Can anyone explain how P/Invoke is able to cast the 32-bit HANDLE value returned from CreateFile (for example) to a SafeFileHandle object? Have a look at this code snippet from the .NET...
6
by: MIUSS | last post by:
Hello I got an unusual problem and I don't know how to solve it out. I need to get success with the handle variable hFile. It's not problem 'til I use wcscpy(...). I mean, when I take out...
5
by: =?Utf-8?B?R2FyeQ==?= | last post by:
Been struggling with the code below for the last couple of days: m_hSerialHandle = CreateFile("COM1:", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, /*FILE_FLAG_OVERLAPPED*/0, NULL); ...
2
by: Kerem Gümrükcü | last post by:
Hi all, sorry for Crossposting, but i dont know whether someone can help me here. If i remember right, there was a Class or a Member function in the .NET Framework that could do mostly the same...
6
by: alag20 | last post by:
Hi Guys, I need some urgent help with this as I am becoming clueless now. I have 2 DllImport as below from Kernel32 private static extern int GetPrivateProfileString(string section, int key,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.