Article View: borland.public.cppbuilder.nativeapi
Article #7446Re: What's the maximal Length of the Name in CreateMailslot()
From: Remy Lebeau (TeamB)
Date: Sun, 30 Jan 2005 13:26
Date: Sun, 30 Jan 2005 13:26
34 lines
2168 bytes
2168 bytes
"Phuoc Can HUA" <home}-a-t-{huaonline-dot}com> wrote in message
news:opsle0x5goypkypy@newsgroups.borland.com...
> I always received an error 183 (Cannot create a file when that file
already exists.)
Error 183 is ERROR_ALREADY_EXISTS. The description text is misleading. In
the case of named Kernel objects (mutexes, semaphores, mailslots, etc.),
ERROR_ALREADY_EXISTS is not an actual error. It simply means that the named
object already exists in memory, and the function creating the object will
return a handle to the existing object rather than creating a new object
instance.
When you get 183, did CreateMailSlot() return INVALID_HANDLE_VALUE, or did
it actually return something else? Most likely, it is returning an actual
valid handle.
> I guess that my slot name were truncated so that I got a name conflict.
Not true.
> 1) What's the maximal length?
The length of the name is not limited.
> 2) Is it compiler dependent?
It has nothing to do with the compiler. You are calling a Win32 API
function. It doesn't matter which programming language is calling the
function because they all call it the same way.
Gambit
Technical Details
Message-ID:
<41fcdfca$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!demon!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<opsle0x5goypkypy@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,dea5be0b0abc8a41 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <opsle0x5goypkypy@newsgroups.borland.com> Subject: Re: What's the maximal Length of the Name in CreateMailslot() Date: Sun, 30 Jan 2005 05:26:21 -0800 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <41fcdfca$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1107091402 68.69.17.41 (30 Jan 2005 05:23:22 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!demon!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail