GVKun编程网logo

Windows是否有可以从C调用的JSON API?(c语言调用windows api)

16

本文将为您提供关于Windows是否有可以从C调用的JSONAPI?的详细介绍,我们还将为您解释c语言调用windowsapi的相关知识,同时,我们还将为您提供关于c–是否有任何Win32API可以在

本文将为您提供关于Windows是否有可以从C调用的JSON API?的详细介绍,我们还将为您解释c语言调用windows api的相关知识,同时,我们还将为您提供关于c – 是否有任何Win32 API可以在Windows中触发休眠或挂起模式?、c# – Windows 8中是否有特殊的API来挂载ISO文件?、powershell – 我可以从Windows 8.1中删除Windows App Store吗?、silverlight – Windows Phone 7中是否有可用的颜色选择器控件?的实用信息。

本文目录一览:

Windows是否有可以从C调用的JSON API?(c语言调用windows api)

Windows是否有可以从C调用的JSON API?(c语言调用windows api)

我可以在C中调用 Windows中的 JSON本机实现吗?如果没有,那么.NET或C#呢?或者,如果人们希望在Windows应用程序中使用JSON时使用任何库或实现,该怎么办?

解决方法

是的,有一个内置的Windows JSON解析器: http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx

可以使用.NET互操作工具(COM Callable Wrapper)从本地语言调用它,这可能比真正的本机库更适合您,正如第一个答案所示.

c – 是否有任何Win32 API可以在Windows中触发休眠或挂起模式?

c – 是否有任何Win32 API可以在Windows中触发休眠或挂起模式?

是否有任何Win32 API将机器置于休眠或挂起模式?

我阅读了MSDN,发现当电源管理事件发生时,WM_POWERbroADCAST消息被广播.我想到了用PostMessage(WM_POWERbroADCAST)模拟相同的东西.这是正确的做法还是存在任何Win32 API来实现这一目标?

解决方法

查看
SetSuspendState.

请注意,您需要SE_SHUTDOWN_NAME权限,如引用的msdn页面所述.

c# – Windows 8中是否有特殊的API来挂载ISO文件?

c# – Windows 8中是否有特殊的API来挂载ISO文件?

您可能知道 Windows资源管理器允许将ISO文件挂载到虚拟驱动器.
有没有可用于执行此操作的API?

解决方法

本机函数调用 AttachVirtualDisk.

但是,如果你正在使用C#,就像你的标签所示,它可能更容易只是call out to PowerShell并使用它的包装函数Mount-DiskImage

using System.Management.Automation;

namespace IsoMountTest
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var isoPath = @"C:\Foo\bar.iso";
            using (var ps = PowerShell.Create())
            {
                ps.AddCommand("Mount-diskimage").AddParameter("ImagePath",isoPath).Invoke();
            }
        }
    }
}

powershell – 我可以从Windows 8.1中删除Windows App Store吗?

powershell – 我可以从Windows 8.1中删除Windows App Store吗?

我被赋予了从全新的Acer笔记本电脑中删除英国媒体报道的任务.我(以及笔记本电脑所有者)对英国媒体报道软件的定义包括所有预安装的应用程序和Winstore本身.你可能不同意这一点,但那不是重点.

我尝试了带有Winstore ID的remove-appxpackage Powershell命令并出错,其中重要的部分是

This app is part of Windows and cannot be uninstalled on a per-user basis. An
administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However,it may not be possible to uninstall the app.

我没有在Windows功能菜单中看到任何此类选项.可以从Win8.1中删除Winstore吗?

这是完整的错误消息(供参考):

remove-appxpackage : Deployment Failed with HRESULT: 0x80073CFA,Removal Failed. Please contact your software vendor.
(Exception from HRESULT: 0x80073CFA)
error 0x80070032: Appx Deployment Remove operation on package winstore_1.0.0.0_neutral_neutral_cw5n1h2txyewy from:
C:\Windows\WinStore Failed. This app is part of Windows and cannot be uninstalled on a per-user basis. An
administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However,it may
not be possible to uninstall the app.
NOTE: For additional information,look for [ActivityId] 83cee5eb-80ef-0001-3bc1-cf83ef80d001 in the Event Log or use
the command line Get-AppxLog -ActivityID 83cee5eb-80ef-0001-3bc1-cf83ef80d001
At line:1 char:1
+ remove-appxpackage winstore_1.0.0.0_neutral_neutral_cw5n1h2txyewy -confirm
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (winstore_1.0.0....l_cw5n1h2txyewy:String) [Remove-AppxPackage],IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

解决方法

我相信你现在已经知道了这一点,但看到你没有给这个问题一个正确答案的复选标记我给你我两分钱.

首先停止名为的服务:

>转到服务
>查找名为的服务:显示名称:Windows应用商店服务(WSService)
>运行“remove-appxpackage Winstore的ID”

这应该删除应用程序,但只有在服务停止后才会删除.如果在服务中找不到该服务,请在注册表中找到它.注册表名称是:Service Name(registry):WSService

让我知道这是否会帮助你一年半之后.为了将来参考,运行服务的所有应用程序很可能需要在可以删除之前停止服务.

UnderDog

silverlight – Windows Phone 7中是否有可用的颜色选择器控件?

silverlight – Windows Phone 7中是否有可用的颜色选择器控件?

我需要在 Windows Phone 7项目中使用颜色选择器控件.我在 Silverlight Contrib中尝试过控件,但我无法在WP7项目中使用它.甚至有 a discussion with the same question但没有回复.我该如何使用控件?或者我可以使用替代品吗?

解决方法

根据您需要的颜色数量,此博客会在设置中提供类似“重音”的页面 – http://blogs.msdn.com/b/priozersk/archive/2010/09/17/customizing-picker-box-dialog.aspx

今天的关于Windows是否有可以从C调用的JSON API?c语言调用windows api的分享已经结束,谢谢您的关注,如果想了解更多关于c – 是否有任何Win32 API可以在Windows中触发休眠或挂起模式?、c# – Windows 8中是否有特殊的API来挂载ISO文件?、powershell – 我可以从Windows 8.1中删除Windows App Store吗?、silverlight – Windows Phone 7中是否有可用的颜色选择器控件?的相关知识,请在本站进行查询。

本文标签: