00265 {
00266
CShellLink mld;
00267
DWORD fResult;
00268 LPNT_CONSOLE_PROPS lpExtraData;
00269
DWORD dwSize = 0;
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292 RtlZeroMemory( &mld,
sizeof(mld) );
00293
00294
00295
if (!
LoadLink( pszLinkName, &mld )) {
00296 RIPMSG1(RIP_WARNING,
"LoadLink %ws failed", pszLinkName);
00297 fResult =
LINK_NOINFO;
00298
goto Cleanup;
00299 }
00300
00301
00302
ASSERT(cb >=
sizeof(
LNKPROPNTCONSOLE));
00303
00304
00305 RtlZeroMemory( lpvBuffer, cb );
00306
00307
00308
if (mld.
pszName)
00309 lstrcpy( ((
LPLNKPROPNTCONSOLE)lpvBuffer)->pszName, mld.
pszName );
00310
if (mld.
pszIconLocation)
00311 lstrcpy( ((LPLNKPROPNTCONSOLE)lpvBuffer)->pszIconLocation, mld.
pszIconLocation );
00312 ((
LPLNKPROPNTCONSOLE)lpvBuffer)->uIcon = mld.
sld.iIcon;
00313 ((
LPLNKPROPNTCONSOLE)lpvBuffer)->uShowCmd = mld.
sld.iShowCmd;
00314 ((
LPLNKPROPNTCONSOLE)lpvBuffer)->uHotKey = mld.
sld.wHotkey;
00315 fResult =
LINK_SIMPLEINFO;
00316
00317
00318
for( lpExtraData = (LPNT_CONSOLE_PROPS)mld.
pExtraData;
00319 lpExtraData && lpExtraData->cbSize;
00320 (LPBYTE)lpExtraData += dwSize
00321 )
00322 {
00323 dwSize = lpExtraData->cbSize;
00324
if (dwSize)
00325 {
00326
if (lpExtraData->dwSignature == NT_CONSOLE_PROPS_SIG)
00327 {
00328
00329 RtlCopyMemory( &((LPLNKPROPNTCONSOLE)lpvBuffer)->console_props,
00330 lpExtraData,
00331
sizeof( NT_CONSOLE_PROPS )
00332 );
00333 fResult =
LINK_FULLINFO;
00334
#if !defined(FE_SB)
00335
break;
00336
#endif
00337
}
00338
#if defined(FE_SB)
00339
if (lpExtraData->dwSignature == NT_FE_CONSOLE_PROPS_SIG)
00340 {
00341 LPNT_FE_CONSOLE_PROPS lpFEExtraData = (LPNT_FE_CONSOLE_PROPS)lpExtraData;
00342
00343 RtlCopyMemory( &((LPLNKPROPNTCONSOLE)lpvBuffer)->fe_console_props,
00344 lpFEExtraData,
00345
sizeof( NT_FE_CONSOLE_PROPS )
00346 );
00347 }
00348
#endif
00349
}
00350 }
00351
00352
#if 0
00353
#define ConsoleInfo ((LPLNKPROPNTCONSOLE)lpvBuffer)
00354
{
00355 TCHAR szTemp[ 256 ];
00356
INT i;
00357
00358 wsprintf( szTemp, TEXT(
"[GetLinkProperties -- Link Properties for %s]\n"), pszLinkName );
00359 OutputDebugString( szTemp );
00360 wsprintf( szTemp, TEXT(
" wFillAttribute = 0x%04X\n"), ConsoleInfo->console_props.wFillAttribute );
00361 OutputDebugString( szTemp );
00362 wsprintf( szTemp, TEXT(
" wPopupFillAttribute = 0x%04X\n"), ConsoleInfo->console_props.wPopupFillAttribute );
00363 OutputDebugString( szTemp );
00364 wsprintf( szTemp, TEXT(
" dwScreenBufferSize = (%d , %d)\n"), ConsoleInfo->console_props.dwScreenBufferSize.X, ConsoleInfo->console_props.dwScreenBufferSize.Y );
00365 OutputDebugString( szTemp );
00366 wsprintf( szTemp, TEXT(
" dwWindowSize = (%d , %d)\n"), ConsoleInfo->console_props.dwWindowSize.X, ConsoleInfo->console_props.dwWindowSize.Y );
00367 OutputDebugString( szTemp );
00368 wsprintf( szTemp, TEXT(
" dwWindowOrigin = (%d , %d)\n"), ConsoleInfo->console_props.dwWindowOrigin.X, ConsoleInfo->console_props.dwWindowOrigin.Y );
00369 OutputDebugString( szTemp );
00370 wsprintf( szTemp, TEXT(
" nFont = 0x%X\n"), ConsoleInfo->console_props.nFont );
00371 OutputDebugString( szTemp );
00372 wsprintf( szTemp, TEXT(
" nInputBufferSize = 0x%X\n"), ConsoleInfo->console_props.nInputBufferSize );
00373 OutputDebugString( szTemp );
00374 wsprintf( szTemp, TEXT(
" dwFontSize = (%d , %d)\n"), ConsoleInfo->console_props.dwFontSize.X, ConsoleInfo->console_props.dwFontSize.Y );
00375 OutputDebugString( szTemp );
00376 wsprintf( szTemp, TEXT(
" uFontFamily = 0x%08X\n"), ConsoleInfo->console_props.uFontFamily );
00377 OutputDebugString( szTemp );
00378 wsprintf( szTemp, TEXT(
" uFontWeight = 0x%08X\n"), ConsoleInfo->console_props.uFontWeight );
00379 OutputDebugString( szTemp );
00380 wsprintf( szTemp, TEXT(
" FaceName = %ws\n"), ConsoleInfo->console_props.FaceName );
00381 OutputDebugString( szTemp );
00382 wsprintf( szTemp, TEXT(
" uCursorSize = %d\n"), ConsoleInfo->console_props.uCursorSize );
00383 OutputDebugString( szTemp );
00384 wsprintf( szTemp, TEXT(
" bFullScreen = %s\n"), ConsoleInfo->console_props.bFullScreen ? TEXT(
"TRUE") : TEXT(
"FALSE") );
00385 OutputDebugString( szTemp );
00386 wsprintf( szTemp, TEXT(
" bQuickEdit = %s\n"), ConsoleInfo->console_props.bQuickEdit ? TEXT(
"TRUE") : TEXT(
"FALSE") );
00387 OutputDebugString( szTemp );
00388 wsprintf( szTemp, TEXT(
" bInsertMode = %s\n"), ConsoleInfo->console_props.bInsertMode ? TEXT(
"TRUE") : TEXT(
"FALSE") );
00389 OutputDebugString( szTemp );
00390 wsprintf( szTemp, TEXT(
" bAutoPosition = %s\n"), ConsoleInfo->console_props.bAutoPosition ? TEXT(
"TRUE") : TEXT(
"FALSE") );
00391 OutputDebugString( szTemp );
00392 wsprintf( szTemp, TEXT(
" uHistoryBufferSize = %d\n"), ConsoleInfo->console_props.uHistoryBufferSize );
00393 OutputDebugString( szTemp );
00394 wsprintf( szTemp, TEXT(
" uNumHistoryBuffers = %d\n"), ConsoleInfo->console_props.uNumberOfHistoryBuffers );
00395 OutputDebugString( szTemp );
00396 wsprintf( szTemp, TEXT(
" bHistoryNoDup = %s\n"), ConsoleInfo->console_props.bHistoryNoDup ? TEXT(
"TRUE") : TEXT(
"FALSE") );
00397 OutputDebugString( szTemp );
00398 OutputDebugString( TEXT(
" ColorTable = [") );
00399 i=0;
00400
while( i < 16 )
00401 {
00402 OutputDebugString( TEXT(
"\n ") );
00403 wsprintf( szTemp, TEXT(
"0x%08X "), ConsoleInfo->console_props.ColorTable[i++]);
00404 OutputDebugString( szTemp );
00405 wsprintf( szTemp, TEXT(
"0x%08X "), ConsoleInfo->console_props.ColorTable[i++]);
00406 OutputDebugString( szTemp );
00407 wsprintf( szTemp, TEXT(
"0x%08X "), ConsoleInfo->console_props.ColorTable[i++]);
00408 OutputDebugString( szTemp );
00409 wsprintf( szTemp, TEXT(
"0x%08X "), ConsoleInfo->console_props.ColorTable[i++]);
00410 OutputDebugString( szTemp );
00411 }
00412 OutputDebugString( TEXT(
"]\n\n") );
00413 }
00414
#undef ConsoleInfo
00415
#endif
00416
00417 Cleanup:
00418
if (mld.
pszName)
00419
ConsoleHeapFree( mld.
pszName );
00420
if (mld.
pszRelPath)
00421
ConsoleHeapFree( mld.
pszRelPath );
00422
if (mld.
pszWorkingDir)
00423
ConsoleHeapFree( mld.
pszWorkingDir );
00424
if (mld.
pszArgs)
00425
ConsoleHeapFree( mld.
pszArgs );
00426
if (mld.
pszIconLocation)
00427
ConsoleHeapFree( mld.
pszIconLocation );
00428
if (mld.
pExtraData)
00429
ConsoleHeapFree( mld.
pExtraData );
00430
00431
return fResult;
00432
00433 }