Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
379 Beiträge
 
#4

AW: Probleme mit NamedPipe/Mailslot nach Umstieg auf Windows 11

  Alt 14. Jan 2025, 10:17
You are right but this wasn't my question.
There is no different to use my string methode or your for the Handle-Problem with Mailslot and Windows 11
OK, fair enough, but using NullStr, it is default and defined in system.pas and should never be assigned and this throw me after different thing, just use your own.

Anyways, the error code 3025 is not documented, and this happened in the past many times with MSDN, also Error COdes do evolve with Windows OS per version and in many times per update !
So you should try to use this to get the real name/message for the error
Delphi-Quellcode:
  Writeln('---- ' + IntToStr(3022));
  Writeln(SysErrorMessage(3022));
  Writeln('---- ' + IntToStr(3023));
  Writeln(SysErrorMessage(3023));
  Writeln('---- ' + IntToStr(3024));
  Writeln(SysErrorMessage(3024));
  Writeln('---- ' + IntToStr(3025));
  Writeln(SysErrorMessage(3025));
  Writeln('---- ' + IntToStr(3026));
  Writeln(SysErrorMessage(3026));
But be careful here !!
These windows API, that handle errors attached names are well defined for existing ones but have unknown result for non documented ones, as example this error code 3025 on my Windows 10 will return the following
Zitat:
---- 3022
The specified printer cannot be shared
---- 3023
There is a problem with a configuration of user specified
shut down command file. The UPS service started anyway
---- 3024

---- 3025
A defective sector on drive %1 has been replaced (hotfixed).
No data was lost. You should run CHKDSK soon to restore full
performance and replenish the volume's spare sector pool.

The hotfix occurred while processing a remote request
---- 3026
A disk error occurred on the HPFS volume in drive %1.
The error occurred while processing a remote request
out of these only 3022 is only the correct one and it is exist in https://learn.microsoft.com/en-us/wi...es--1700-3999-
Now to the others and because the according API is built in away that separate ranges by masking and it is really complex, it does return incorrect for the undefined, to be exact : the message
Zitat:
A defective sector on drive %1 has been replaced (hotfixed).
No data was lost. You should run CHKDSK soon to restore full
performance and replenish the volume's spare sector pool.

The hotfix occurred while processing a remote request
is not an error code but status code, and it has 3181 value
https://github.com/tpn/winddk-8.1/bl...MErrlog.h#L449
This what i meant by these API(s) handle error code and status code as one input and they do juggling with the values/ranges, so for non existed value they will return undefined like this very case.

Now to your exact problem, which i can't say for sure but i use different logic:
1) Error Codes like Status Codes, are grouped in ranges when they are belongs to one category.
2) That error code 3025 are very close to the one existed in Windows 10 (3022),
3) i can deduce it has something to do with printer or printer driver, so that very generic name for pipe you are using could be already in use on Windows 11 for a printer.

suggestions:
1) Get the error message from Windows 11.
2) Just use different name or find what driver is involved if the hypotheses above stand.
3) Your application on Windows 11 is running with limited privileges for some reason and not allowed to handle pipes, notice you are using CreateFile with Open_Existing, have you tried to switch to OpenFile instead of CreateFile.
4) You might want to remove File_Attribute_Normal, yes it is said as default in documentation, but the MSDN doesn't it all, use 0 instead any attribute and let it do its thing, notice in every MSDN example for NamedPipe the attribute is always 0 (none).

Hope that helps.
Kas
  Mit Zitat antworten Zitat