Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function ...
var WNetName, WRemark, WFilePath, WRWPass : WideString;
...
begin
...
If IsNT then
Begin
NoError := 0;
WNetName := NetName; // Cast string to WideString
MyShareNT.shi2_netname := PWideChar(WNetName); // Correct Pointertype
MyShareNT.shi2_type := ShareType;
MyShareNT.shi2_permis := $7F; // => ACCESS_ALL
WRemark := Remark;
MyShareNT.shi2_remark := PWideChar(WRemark);
MyShareNT.shi2_maxusers := $FFFFFFFF; // Unlimited users
WFilePath := FilePath;
MyShareNT.shi2_path := PWideChar(WFilePath);
WRWPass := RWPass;
MyShareNT.shi2_password := PWideChar(WRWPass);
MyShareNT.shi2_eof := $0; // No more to follow?
Result := ERROR_SUCCESS;
try
Result := NetShareAddNT(ServerName,2,@MyShareNT,@NoError);
finally
Case Result of
ERROR_ACCESS_DENIED,
ERROR_INVALID_LEVEL,
ERROR_INVALID_NAME,
ERROR_INVALID_PARAMETER:
ShowMessage('FilePath : ' + FilePath + ' Size : ' + IntToStr(SizeOf(MyShareNT))+ #13 + #10 + 'Result : ' + IntToStr(Result) + ' ' + GetNetErrorString(2100+Result) + ' Error : ' + IntToStr(NoError));
End;
End;
End
Else
// Windows 9x part (see my first code-post)
...