• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ FWPRINTF函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FWPRINTF函数的典型用法代码示例。如果您正苦于以下问题:C++ FWPRINTF函数的具体用法?C++ FWPRINTF怎么用?C++ FWPRINTF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了FWPRINTF函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: FuseUnmount

static NTSTATUS DOKAN_CALLBACK FuseUnmount(PDOKAN_FILE_INFO	DokanFileInfo)
{
	impl_fuse_context *impl=the_impl;
	if (impl->debug()) FWPRINTF(stderr, L"Unmount\n");

	impl_chain_guard guard(impl,DokanFileInfo->ProcessId);
	return errno_to_ntstatus_error(impl->unmount(DokanFileInfo));
}
开发者ID:CrAsH1101,项目名称:dokany,代码行数:8,代码来源:docanfuse.cpp


示例2: FuseCleanup

static void DOKAN_CALLBACK FuseCleanup(LPCWSTR FileName,
                                       PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"Cleanup: %s\n\n", FileName);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  impl->cleanup(FileName, DokanFileInfo);
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:9,代码来源:docanfuse.cpp


示例3: FuseDeleteFile

static NTSTATUS DOKAN_CALLBACK FuseDeleteFile(LPCWSTR FileName,
                                              PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"DeleteFile %s\n", FileName);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(impl->delete_file(FileName, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:9,代码来源:docanfuse.cpp


示例4: FuseCloseFile

static int DOKAN_CALLBACK FuseCloseFile(
				LPCWSTR					FileName,
				PDOKAN_FILE_INFO		DokanFileInfo)
{
	impl_fuse_context *impl=the_impl;
	if (impl->debug()) FWPRINTF(stderr, L"Close: %s\n\n", FileName);
	
	impl_chain_guard guard(impl,DokanFileInfo->ProcessId);
	return -errno_to_win32_error(impl->close_file(FileName,DokanFileInfo));
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:10,代码来源:docanfuse.cpp


示例5: FuseSetFileAttributes

static NTSTATUS DOKAN_CALLBACK FuseSetFileAttributes(
    LPCWSTR FileName, DWORD FileAttributes, PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"SetFileAttributes %s\n", FileName);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(
      impl->set_file_attributes(FileName, FileAttributes, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:10,代码来源:docanfuse.cpp


示例6: FuseSetEndOfFile

static NTSTATUS DOKAN_CALLBACK FuseSetEndOfFile(
    LPCWSTR FileName, LONGLONG ByteOffset, PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"SetEndOfFile %s, %I64d\n", FileName, ByteOffset);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(
      impl->set_end_of_file(FileName, ByteOffset, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:10,代码来源:docanfuse.cpp


示例7: FuseDeleteDirectory

static int DOKAN_CALLBACK FuseDeleteDirectory(
					LPCWSTR				FileName,
					PDOKAN_FILE_INFO	DokanFileInfo)
{
	impl_fuse_context *impl=the_impl;
	if (impl->debug()) FWPRINTF(stderr, L"DeleteDirectory %s\n", FileName);
	
	impl_chain_guard guard(impl,DokanFileInfo->ProcessId);
	return -errno_to_win32_error(impl->delete_directory(FileName,DokanFileInfo));
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:10,代码来源:docanfuse.cpp


示例8: FuseGetDiskFreeSpace

static int DOKAN_CALLBACK FuseGetDiskFreeSpace(PULONGLONG FreeBytesAvailable,
				PULONGLONG TotalNumberOfBytes, PULONGLONG TotalNumberOfFreeBytes,
				PDOKAN_FILE_INFO DokanFileInfo)
{
	impl_fuse_context *impl=the_impl;
	if (impl->debug()) FWPRINTF(stderr, L"GetDiskFreeSpace\n");
	
	impl_chain_guard guard(impl,DokanFileInfo->ProcessId);
	return -errno_to_win32_error(impl->get_disk_free_space(FreeBytesAvailable,TotalNumberOfBytes,
		TotalNumberOfFreeBytes, DokanFileInfo));
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:11,代码来源:docanfuse.cpp


示例9: FuseGetFileInformation

static NTSTATUS DOKAN_CALLBACK FuseGetFileInformation(
    LPCWSTR FileName, LPBY_HANDLE_FILE_INFORMATION HandleFileInformation,
    PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"GetFileInfo : %s\n", FileName);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(impl->get_file_information(
      FileName, HandleFileInformation, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:11,代码来源:docanfuse.cpp


示例10: FuseUnlockFile

static NTSTATUS DOKAN_CALLBACK FuseUnlockFile(LPCWSTR FileName,
                                              LONGLONG ByteOffset,
                                              LONGLONG Length,
                                              PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"UnlockFile %s\n", FileName);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(
      impl->unlock_file(FileName, ByteOffset, Length, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:12,代码来源:docanfuse.cpp


示例11: FuseMoveFile

static NTSTATUS DOKAN_CALLBACK
FuseMoveFile(LPCWSTR FileName, // existing file name
             LPCWSTR NewFileName, BOOL ReplaceIfExisting,
             PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"MoveFile %s -> %s\n\n", FileName, NewFileName);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(
      impl->move_file(FileName, NewFileName, ReplaceIfExisting, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:12,代码来源:docanfuse.cpp


示例12: FuseFindFiles

static int DOKAN_CALLBACK FuseFindFiles(
				LPCWSTR				FileName,
				PFillFindData		FillFindData, // function pointer
				PDOKAN_FILE_INFO	DokanFileInfo)
{
	impl_fuse_context *impl=the_impl;
	if (impl->debug()) FWPRINTF(stderr, L"FindFiles :%s\n", FileName);
	
	impl_chain_guard guard(impl,DokanFileInfo->ProcessId);
	return -errno_to_win32_error(impl->find_files(FileName,FillFindData,
		DokanFileInfo));
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:12,代码来源:docanfuse.cpp


示例13: FuseReadFile

static NTSTATUS DOKAN_CALLBACK FuseReadFile(LPCWSTR FileName, LPVOID Buffer,
                                            DWORD BufferLength,
                                            LPDWORD ReadLength, LONGLONG Offset,
                                            PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"ReadFile : %s from %I64d len %u\n", FileName,
             (__int64)Offset, (unsigned)BufferLength);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(impl->read_file(
      FileName, Buffer, BufferLength, ReadLength, Offset, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:13,代码来源:docanfuse.cpp


示例14: FuseCreateFile

static int DOKAN_CALLBACK FuseCreateFile(
				 LPCWSTR				FileName,
				 DWORD					AccessMode,
				 DWORD					ShareMode,
				 DWORD					CreationDisposition,
				 DWORD					FlagsAndAttributes,
				 PDOKAN_FILE_INFO		DokanFileInfo)
{
	impl_fuse_context *impl=the_impl;
	if (impl->debug()) {
		FWPRINTF(stderr, L"CreateFile : %s\n", FileName);
		DebugConstantBit("\tAccessMode", AccessMode,  cAccessMode);
		DebugConstantBit("\tShareMode",  ShareMode,   cShareMode);
		DebugConstant("\tDisposition",   CreationDisposition, cDisposition);
		FWPRINTF(stderr, L"\tFlags: %u (0x%x)\n", FlagsAndAttributes, FlagsAndAttributes);
		fflush(stderr);
	}
	
	impl_chain_guard guard(impl,DokanFileInfo->ProcessId);
	return -win_error(impl->create_file(FileName,AccessMode,ShareMode,
		CreationDisposition,FlagsAndAttributes,DokanFileInfo));
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:22,代码来源:docanfuse.cpp


示例15: FuseSetFileTime

static NTSTATUS DOKAN_CALLBACK FuseSetFileTime(LPCWSTR FileName,
                                               CONST FILETIME *CreationTime,
                                               CONST FILETIME *LastAccessTime,
                                               CONST FILETIME *LastWriteTime,
                                               PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"SetFileTime %s\n", FileName);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(impl->set_file_time(
      FileName, CreationTime, LastAccessTime, LastWriteTime, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:13,代码来源:docanfuse.cpp


示例16: FuseCreateFile

static NTSTATUS DOKAN_CALLBACK FuseCreateFile(
				 LPCWSTR						FileName,
				 PDOKAN_IO_SECURITY_CONTEXT		SecurityContext,
				 ACCESS_MASK					DesiredAccess,
				 ULONG							FileAttributes,
				 ULONG							ShareAccess,
				 ULONG							CreateDisposition,
				 ULONG							CreateOptions,
				 PDOKAN_FILE_INFO				DokanFileInfo)
{
	impl_fuse_context *impl = the_impl;

	if (impl->debug()) {
		FWPRINTF(stderr, L"CreateFile : %s\n", FileName);
		DebugConstantBit("\tDesiredAccess", DesiredAccess, cAccessMode);
		DebugConstantBit("\tShareAccess", ShareAccess, cShareMode);
		DebugConstant("\tDisposition", CreateDisposition, cDisposition);
		FWPRINTF(stderr, L"\tAttributes: %u (0x%x)\n", FileAttributes, FileAttributes);
		FWPRINTF(stderr, L"\tOptions: %u (0x%x)\n", CreateOptions, CreateOptions);
		fflush(stderr);
	}

	impl_chain_guard guard(impl,DokanFileInfo->ProcessId);

	if((CreateOptions & FILE_DIRECTORY_FILE) == FILE_DIRECTORY_FILE) {

		if(CreateDisposition == FILE_CREATE || CreateDisposition == FILE_OPEN_IF) {
			return errno_to_ntstatus_error(impl->create_directory(FileName, DokanFileInfo));
		}
		else if(CreateDisposition == FILE_OPEN) {

			return errno_to_ntstatus_error(impl->open_directory(FileName, DokanFileInfo));
		}
	}

	return -win_error(impl->create_file(FileName, CreateDisposition, ShareAccess, DesiredAccess, FileAttributes,
		DokanFileInfo));
}
开发者ID:CrAsH1101,项目名称:dokany,代码行数:38,代码来源:docanfuse.cpp


示例17: FuseWriteFile

static NTSTATUS DOKAN_CALLBACK FuseWriteFile(LPCWSTR FileName, LPCVOID Buffer,
                                             DWORD NumberOfBytesToWrite,
                                             LPDWORD NumberOfBytesWritten,
                                             LONGLONG Offset,
                                             PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"WriteFile : %s, offset %I64d, length %lu\n", FileName,
             Offset, NumberOfBytesToWrite);

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  return errno_to_ntstatus_error(
      impl->write_file(FileName, Buffer, NumberOfBytesToWrite,
                       NumberOfBytesWritten, Offset, DokanFileInfo));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:15,代码来源:docanfuse.cpp


示例18: GetVolumeInformation

static NTSTATUS DOKAN_CALLBACK
GetVolumeInformation(LPWSTR VolumeNameBuffer, DWORD VolumeNameSize,
                     LPDWORD VolumeSerialNumber, LPDWORD MaximumComponentLength,
                     LPDWORD FileSystemFlags, LPWSTR FileSystemNameBuffer,
                     DWORD FileSystemNameSize, PDOKAN_FILE_INFO DokanFileInfo) {
  impl_fuse_context *impl = the_impl;
  if (impl->debug())
    FWPRINTF(stderr, L"GetVolumeInformation\n");

  impl_chain_guard guard(impl, DokanFileInfo->ProcessId);
  *VolumeSerialNumber = 0;
  *MaximumComponentLength = 255;
  return errno_to_ntstatus_error(impl->get_volume_information(
      VolumeNameBuffer, VolumeNameSize, FileSystemNameBuffer,
      FileSystemNameSize, DokanFileInfo, FileSystemFlags));
}
开发者ID:BoRiSGz,项目名称:dokany,代码行数:16,代码来源:docanfuse.cpp


示例19: PrintError

//***************************************************************************
// Function:  PrintError
// Purpose:   Formats and prints the error message
//***************************************************************************
void PrintError(char *pszFailureReason, SCODE psc, DWORD dwMode)
{
    VARIANT varString;
    SCODE sc;
    IWbemClassObject *pErrorObject = NULL;
    IErrorInfo* pEI = NULL;

    fprintf(stdout, "%s\n", pszFailureReason);
    fprintf(stdout, "FunctionReturn: %S(0x%08lx)\n", WbemErrorString(psc), psc);

    if (GetErrorInfo(0, &pEI) == S_OK)
    {
        pEI->QueryInterface(IID_IWbemClassObject, (void**)&pErrorObject);
        pEI->Release();
    }

    if (pErrorObject != NULL)
    {
        VariantInit(&varString);

        if (dwMode == ERROR_MODE_PRINTFIELDS)
        {
            if (pErrorObject->InheritsFrom(L"__NotifyStatus") != WBEM_NO_ERROR)
            {
                fprintf(stdout, "Unrecognized Error Object type\n");
            }
            else if (pErrorObject->InheritsFrom(L"__ExtendedStatus") == WBEM_NO_ERROR)
            {
                sc = pErrorObject->Get(L"Description", 0L, &varString, NULL, NULL);
                if (sc != S_OK)
                {
                    fprintf(stdout, "Can't get Description: %d\n", sc);
                }
                else if (V_VT(&varString) == VT_BSTR)
                {
                    FWPRINTF(stdout, L"Description: %wS\n", V_BSTR(&varString));
                }
                VariantClear(&varString);

                pErrorObject->Get(L"Operation", 0L, &varString, NULL, NULL);
                if (sc != S_OK)
                {
                    fprintf(stdout, "Can't get Operation: %d\n", sc);
                }
                else if (V_VT(&varString) == VT_BSTR)
                {
                    FWPRINTF(stdout, L"Operation: %wS\n", V_BSTR(&varString));
                }
                VariantClear(&varString);

                pErrorObject->Get(L"ParameterInfo", 0L, &varString, NULL, NULL);
                if (sc != S_OK)
                {
                    fprintf(stdout, "Can't get ParameterInfo: %d\n", sc);
                }
                else if (V_VT(&varString) == VT_BSTR)
                {
                    FWPRINTF(stdout, L"ParameterInfo: %wS\n", V_BSTR(&varString));
                }
                VariantClear(&varString);

                pErrorObject->Get(L"ProviderName", 0L, &varString, NULL, NULL);
                if (sc != S_OK)
                {
                    fprintf(stdout, "Can't get ProviderName: %d\n", sc);
                }
                else if (V_VT(&varString) == VT_BSTR)
                {
                    FWPRINTF(stdout, L"ProviderName: %wS\n", V_BSTR(&varString));
                }
                VariantClear(&varString);
            }
        }
        else
        {
            BSTR bstrObjectText = NULL;
            if (SUCCEEDED(pErrorObject->GetObjectText(0, &bstrObjectText)))
            {
                fprintf(stdout, "%wS", bstrObjectText);
                SysFreeString(bstrObjectText);
            }
        }

        RELEASE(pErrorObject);
    }
}
开发者ID:nizihabi,项目名称:sdk71examples,代码行数:90,代码来源:Utils.Cpp



注:本文中的FWPRINTF函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FW_CMD_OP函数代码示例发布时间:2022-05-30
下一篇:
C++ FWARNING函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap