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

C++ Int32x32To64函数代码示例

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

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



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

示例1: Int64ShraMod32

void Viewport3D::ApplyRotationMatrix(const MR_2DCoordinate & pSrc, MR_2DCoordinate & pDest) const
{
	MR_3DCoordinate lPos;

	lPos.mX = pSrc.mX - mPosition.mX;
	lPos.mY = pSrc.mY - mPosition.mY;

	pDest.mX = (MR_Int32) Int64ShraMod32(Int32x32To64(lPos.mX, mRotationMatrix[0][0]) + Int32x32To64(lPos.mY, mRotationMatrix[0][1]), MR_TRIGO_SHIFT);
	pDest.mY = (MR_Int32) Int64ShraMod32(Int32x32To64(lPos.mX, mRotationMatrix[1][0]) + Int32x32To64(lPos.mY, mRotationMatrix[1][1]), MR_TRIGO_SHIFT);
}
开发者ID:HoverRace,项目名称:HoverRace,代码行数:10,代码来源:Viewport3D.cpp


示例2: HalSetProfileInterval

ULONG
HalSetProfileInterval (
    IN ULONG Interval
    )

/*++

Routine Description:

    This routine sets the profile interrupt interval.

Arguments:

    Interval - Supplies the desired profile interval in 100ns units.

Return Value:

    The actual profile interval.

--*/

{

    LARGE_INTEGER TempValue;

    //
    // If the specified profile interval is less that the minimum profile
    // interval or greater than the maximum profile interval, then set the
    // profile interval to the minimum or maximum as appropriate.
    //

    if (Interval < MINIMUM_PROFILE_INTERVAL) {
        Interval = MINIMUM_PROFILE_INTERVAL;

    } else if (Interval > MAXIMUM_PROFILE_INTERVAL) {
        Interval = MAXIMUM_PROFILE_INTERVAL;
    }

    //
    // First compute the profile count value and then back calculate the
    // actual profile interval.
    //

    TempValue.QuadPart = Int32x32To64(HalpProfileCountRate, Interval);
    TempValue.QuadPart += ROUND_VALUE;
    TempValue = RtlExtendedLargeIntegerDivide(TempValue, ONE_SECOND, NULL);
    TempValue.QuadPart = Int32x32To64(TempValue.LowPart, ONE_SECOND);
    TempValue = RtlExtendedLargeIntegerDivide(TempValue, HalpProfileCountRate, NULL);
    HalpProfileInterval = TempValue.LowPart;
    return HalpProfileInterval;
}
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:51,代码来源:j4prof.c


示例3: filefind_index_write_FILETIME_helper

static int filefind_index_write_FILETIME_helper(lua_State* L, struct FileFindInfo* info) {
#if defined(WIN32)
	return _filefind_push_FILETIME(L, &info->fd.ftLastWriteTime);
#else
	return _filefind_push_FILETIME(L, Int32x32To64(info->attr.st_mtime, 10000000) + 116444736000000000);
#endif
}
开发者ID:Malaar,项目名称:luaplus51-all,代码行数:7,代码来源:filefind.c


示例4: TT_to_FILETIME

static void TT_to_FILETIME( time_t t, FILETIME& ft )
{
	LONGLONG ll;
	ll = Int32x32To64( t, 10000000 ) + 116444736000000000ll;
	ft.dwLowDateTime = ( DWORD )ll;
	ft.dwHighDateTime = ll >> 32;
}
开发者ID:KonstantinKuklin,项目名称:WalCommander,代码行数:7,代码来源:vfs.cpp


示例5: UnixTimevalToFileTime

//after Microsoft KB167296
static void UnixTimevalToFileTime(struct timeval t, LPFILETIME pft)
{
    LONGLONG ll;
    ll = Int32x32To64(t.tv_sec, CSYNC_USEC_IN_SEC*10) + t.tv_usec*10 + CSYNC_SECONDS_SINCE_1601*CSYNC_USEC_IN_SEC*10;
    pft->dwLowDateTime = (DWORD)ll;
    pft->dwHighDateTime = ll >> 32;
}
开发者ID:msphn,项目名称:client,代码行数:8,代码来源:c_time.c


示例6: UnixTimeToFileTime

void UnixTimeToFileTime(time_t t, LPFILETIME pft){
    LONGLONG ll;

    ll = Int32x32To64(t, 10000000) + 116444736000000000;
    pft->dwLowDateTime = (DWORD)ll;
    pft->dwHighDateTime = ll >> 32;
}
开发者ID:wizebin,项目名称:ulti,代码行数:7,代码来源:ULTI_File.cpp


示例7: format_timestamp

static void format_timestamp(uint64_t seconds, int microseconds,
                             char *buffer, int length, char *date_separator,
                             char *date_time_separator, char *time_separator) {
	ULONGLONG timestamp = 0;
	ULONGLONG offset_to_1970 = 116444736000000000;
	SYSTEMTIME st;
	FILETIME ft, ft_local;

	timestamp = Int32x32To64(seconds, 10000000) + offset_to_1970;
	ft.dwHighDateTime = (DWORD)((timestamp >> 32) & 0xFFFFFFFF);
	ft.dwLowDateTime = (DWORD)(timestamp & 0xFFFFFFFF);

	FileTimeToLocalFileTime(&ft, &ft_local);
	FileTimeToSystemTime(&ft_local, &st);

	if (microseconds < 0) {
		_snprintf(buffer, length, "%d%s%02d%s%02d%s%02d%s%02d%s%02d",
		          st.wYear, date_separator, st.wMonth, date_separator,
		          st.wDay, date_time_separator, st.wHour, time_separator,
		          st.wMinute, time_separator, st.wSecond);
	} else {
		_snprintf(buffer, length, "%d%s%02d%s%02d%s%02d%s%02d%s%02d.%06d",
		          st.wYear, date_separator, st.wMonth, date_separator,
		          st.wDay, date_time_separator, st.wHour, time_separator,
		          st.wMinute, time_separator, st.wSecond, microseconds);
	}
}
开发者ID:Tinkerforge,项目名称:brickd,代码行数:27,代码来源:logviewer.c


示例8: ASSERT

bool CArchiverUNARJ::InspectArchiveGetWriteTime(FILETIME &FileTime)
{
	if(!m_hInspectArchive){
		ASSERT(!"Open an Archive First!!!\n");
		return false;
	}
	//拡張版関数で時刻取得
	if(ArchiverGetWriteTimeEx){
		FILETIME TempTime;
		if(!ArchiverGetWriteTimeEx(m_hInspectArchive,&TempTime))return false;
		if(!LocalFileTimeToFileTime(&TempTime,&FileTime))return false;
		return true;
	}
	//通常版関数で時刻取得
	else if(ArchiverGetWriteTime){
		DWORD UnixTime=ArchiverGetWriteTime(m_hInspectArchive);
		if(-1==UnixTime){
			return false;
		}
		//time_tからFileTimeへ変換
		LONGLONG ll = Int32x32To64(UnixTime, 10000000) + 116444736000000000;
		FileTime.dwLowDateTime = (DWORD) ll;
		FileTime.dwHighDateTime = (DWORD)(ll >>32);
		return true;
	}
	else{
开发者ID:Claybird,项目名称:lhaforge,代码行数:26,代码来源:ArchiverUNARJ.cpp


示例9: phOsalNfc_Timer_Start

/* This starts the timer */ 
NFCSTATUS phOsalNfc_Timer_Start(uint32_t    TimerId,
                          uint32_t     dueTimeMsec, 
                          ppCallBck_t  pCallback,
                          void         *pContext)
{
    uint32_t  uIndex;
    LONGLONG  DueTime;
    uint32_t  uWindow = (dueTimeMsec < 50) ? 0 : (dueTimeMsec / 4);

    if (NULL == gpphOsalNfc_Context ||
        PH_OSALNFC_TIMER_ID_INVALID == TimerId) {
        return PHNFCSTVAL(CID_NFC_OSAL, NFCSTATUS_INVALID_PARAMETER);
    }

    uIndex = TimerId - PH_OSAL_TIMER_BASE_ADDRESS;
    
    // Convert dueTimeMsec to relative filetime units (100ns)
    DueTime = Int32x32To64(dueTimeMsec, -10000);

    EnterCriticalSection(&gpphOsalNfc_Context->TimerLock);

    SetThreadpoolTimer(gpphOsalNfc_Context->TimerList[uIndex].pTimer, (FILETIME*)&DueTime, 0, uWindow);
    gpphOsalNfc_Context->TimerList[uIndex].pCallback = pCallback;
    gpphOsalNfc_Context->TimerList[uIndex].pContext  = pContext;

    LeaveCriticalSection(&gpphOsalNfc_Context->TimerLock);

    return NFCSTATUS_SUCCESS;
}
开发者ID:ef2012,项目名称:NFC-Class-Extension-Driver,代码行数:30,代码来源:phOsalNfc_Timer.c


示例10: Int32x32To64

void CFileSystem::TimestampToFiletime(const time_t t, _FILETIME& pft)
{
	LONGLONG ll;
	ll = Int32x32To64(t, 10000000) + 116444736000000000;
	pft.dwLowDateTime = (DWORD)ll;
	pft.dwHighDateTime = ll >> 32;
}
开发者ID:N0U,项目名称:pr-downloader,代码行数:7,代码来源:FileSystem.cpp


示例11: sys_arch_mbox_fetch

u32_t
sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
{
    LARGE_INTEGER LargeTimeout, PreWaitTime, PostWaitTime;
    UINT64 TimeDiff;
    NTSTATUS Status;
    PVOID Message;
    PLWIP_MESSAGE_CONTAINER Container;
    PLIST_ENTRY Entry;
    KIRQL OldIrql;
    PVOID WaitObjects[] = {&mbox->Event, &TerminationEvent};
    
    LargeTimeout.QuadPart = Int32x32To64(timeout, -10000);
    
    KeQuerySystemTime(&PreWaitTime);

    Status = KeWaitForMultipleObjects(2,
                                      WaitObjects,
                                      WaitAny,
                                      Executive,
                                      KernelMode,
                                      FALSE,
                                      timeout != 0 ? &LargeTimeout : NULL,
                                      NULL);

    if (Status == STATUS_WAIT_0)
    {
        KeAcquireSpinLock(&mbox->Lock, &OldIrql);
        Entry = RemoveHeadList(&mbox->ListHead);
        ASSERT(Entry);
        if (IsListEmpty(&mbox->ListHead))
            KeClearEvent(&mbox->Event);
        KeReleaseSpinLock(&mbox->Lock, OldIrql);
        
        Container = CONTAINING_RECORD(Entry, LWIP_MESSAGE_CONTAINER, ListEntry);
        Message = Container->Message;
        ExFreePool(Container);
        
        if (msg)
            *msg = Message;

        KeQuerySystemTime(&PostWaitTime);
        TimeDiff = PostWaitTime.QuadPart - PreWaitTime.QuadPart;
        TimeDiff /= 10000;
        
        return TimeDiff;
    }
    else if (Status == STATUS_WAIT_1)
    {
        /* DON'T remove ourselves from the thread list! */
        PsTerminateSystemThread(STATUS_SUCCESS);
        
        /* We should never get here! */
        ASSERT(FALSE);
        
        return 0;
    }
    
    return SYS_ARCH_TIMEOUT;
}
开发者ID:GYGit,项目名称:reactos,代码行数:60,代码来源:sys_arch.c


示例12: UnixTimeToFileTime

bool UnixTimeToFileTime(unsigned long mtime, LPFILETIME ft)
{
	// Note that LONGLONG is a 64-bit value
	LONGLONG ll = Int32x32To64(mtime, 10000000) + 116444736000000000;
	ft->dwLowDateTime = (DWORD)ll;
	ft->dwHighDateTime = ll >> 32;
	return true;
}
开发者ID:BackupTheBerlios,项目名称:sftp4tc-svn,代码行数:8,代码来源:fsplugin.cpp


示例13: Int32x32To64

void touchmind::util::TimeUtil::UnixTimeToFileTime(time_t t, FILETIME* fileTime)
{
    LONGLONG ll;

    ll = Int32x32To64(t, 10000000) + 116444736000000000;
    fileTime->dwLowDateTime = (DWORD) ll;
    fileTime->dwHighDateTime = ll >> 32;
}
开发者ID:HTshandou,项目名称:TouchMind,代码行数:8,代码来源:TimeUtil.cpp


示例14: UnixTimeToFileTime

FILETIME UnixTimeToFileTime(const time_t t)
{
    FILETIME ft;
    const LONGLONG ll = Int32x32To64(t, 10000000) + 116444736000000000;
    ft.dwLowDateTime = static_cast<DWORD>(ll);
    ft.dwHighDateTime = ll >> 32;
    return ft;
}
开发者ID:VictorVG,项目名称:4,代码行数:8,代码来源:stdafx.cpp


示例15: UnixTimeToFileTime

void UnixTimeToFileTime(const time_t t, LPFILETIME pft)
{
    // Note that LONGLONG is a 64-bit value
    LONGLONG ll;
    ll = Int32x32To64(t, SECS_TO_100NS) + SECS_BETWEEN_EPOCHS * SECS_TO_100NS;
    pft->dwLowDateTime = (DWORD)ll;
    pft->dwHighDateTime = ll >> 32;
}
开发者ID:deepti1011,项目名称:cs6210proj2,代码行数:8,代码来源:xmlrpc_datetime.c


示例16: CreateFile

AREXPORT bool ArUtil::changeFileTimestamp(const char *fileName, 
                                          time_t timestamp) 
{
  if (ArUtil::isStrEmpty(fileName)) {
    ArLog::log(ArLog::Normal,
               "Cannot change date on file with empty name");
    return false;
  }
#ifdef WIN32

  FILETIME fileTime;

  HANDLE hFile = CreateFile(fileName,
                            GENERIC_READ | GENERIC_WRITE,
                             0,NULL,
                             OPEN_EXISTING,
                             0,NULL);

  if (hFile == NULL) {
    return false;
  }


  // The following is extracted from the MSDN article "Converting a time_t Value
  // to a File Time".
  LONGLONG temp = Int32x32To64(timestamp, 10000000) + 116444736000000000;
  fileTime.dwLowDateTime = (DWORD) temp;
  fileTime.dwHighDateTime = temp >> 32;

  SetFileTime(hFile, 
              &fileTime, 
              (LPFILETIME) NULL,  // don't change last access time (?)
              &fileTime);

  CloseHandle(hFile);

#else // unix
        
  char timeBuf[500];
  strftime(timeBuf, sizeof(timeBuf), "%c", ::localtime(&timestamp));
  ArLog::log(ArLog::Normal,
             "Changing file %s modified time to %s",
             fileName,
             timeBuf);


  // time_t newTime = mktime(&timestamp);
  struct utimbuf fileTime;
  fileTime.actime  = timestamp;
  fileTime.modtime = timestamp;
  utime(fileName, &fileTime);

#endif // else unix

  return true;

} // end method changeFileTimestamp
开发者ID:eilo,项目名称:Evolucion-Artificial-y-Robotica-Autonoma-en-Robots-Pioneer-P3-DX,代码行数:57,代码来源:ariaUtil.cpp


示例17: UnixTimeToFileTime

void UnixTimeToFileTime(time_t t, LPFILETIME pft)
{
	// Note that LONGLONG is a 64-bit value
	LONGLONG ll;
	
	ll = Int32x32To64(t, 10000000) + 116444736000000000;
	pft->dwLowDateTime  = (DWORD)ll;
	pft->dwHighDateTime = (DWORD)(ll >> 32);
}
开发者ID:4aiman,项目名称:HexEdit,代码行数:9,代码来源:TypeViewGui.cpp


示例18: UnixTimeToFileTime

static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {{{ */
{
	// Note that LONGLONG is a 64-bit value
	LONGLONG ll;

	ll = Int32x32To64(t, 10000000) + 116444736000000000;
	pft->dwLowDateTime = (DWORD)ll;
	pft->dwHighDateTime = ll >> 32;
}
开发者ID:Distrotech,项目名称:php-src,代码行数:9,代码来源:tsrm_win32.c


示例19: HalStartProfileInterrupt

VOID
HalStartProfileInterrupt (
    KPROFILE_SOURCE ProfileSource
    )

/*++

Routine Description:

    This routine computes the profile count value, writes the compare
    register, clears the count register, and updates the performance
    counter.

    N.B. This routine must be called at PROFILE_LEVEL while holding the
        profile lock.

Arguments:

    Source - Supplies the profile source.

Return Value:

    None.

--*/

{

    PKPRCB Prcb;
    ULONG PreviousCount;
    LARGE_INTEGER TempValue;

    //
    // Compute the profile count from the current profile interval.
    //

    TempValue.QuadPart = Int32x32To64(HalpProfileCountRate,
                                      HalpProfileInterval);

    TempValue.QuadPart += ROUND_VALUE;
    TempValue = RtlExtendedLargeIntegerDivide(TempValue, ONE_SECOND, NULL);

    //
    // Write the compare register and clear the count register.
    //

    PreviousCount = HalpWriteCompareRegisterAndClear(TempValue.LowPart);

    //
    // Update the performance counter by adding in the previous count value.
    //

    Prcb = KeGetCurrentPrcb();
    HalpPerformanceCounter[Prcb->Number].QuadPart += PreviousCount;
    return;
}
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:56,代码来源:j4prof.c


示例20: unixTimeToFiletime

FILETIME unixTimeToFiletime(time_t t) {
  // Note that LONGLONG is a 64-bit value
  LONGLONG ll;

  ll = Int32x32To64(t, 10000000) + 116444736000000000LL;
  FILETIME res;
  res.dwLowDateTime = (DWORD)ll;
  res.dwHighDateTime = (DWORD)(ll >> 32);
  return res;
}
开发者ID:x1596357,项目名称:dokany,代码行数:10,代码来源:utils.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ Int64GetDatum函数代码示例发布时间:2022-05-30
下一篇:
C++ Int32_val函数代码示例发布时间: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